From 4ef2590268d742366747e3d9e1e2042bad79d323 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 21 Sep 2004 22:09:09 +0000 Subject: Remove now-unused long-options static var. (main): Use getopt where it suffices, not getopt_long. --- src/uptime.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'src/uptime.c') diff --git a/src/uptime.c b/src/uptime.c index cf27270ae..1c3b8813f 100644 --- a/src/uptime.c +++ b/src/uptime.c @@ -44,11 +44,6 @@ int getloadavg (); /* The name this program was run with. */ char *program_name; -static struct option const longopts[] = -{ - {NULL, 0, NULL, 0} -}; - static void print_uptime (size_t n, const STRUCT_UTMP *this) { @@ -225,18 +220,8 @@ main (int argc, char **argv) parse_long_options (argc, argv, PROGRAM_NAME, GNU_PACKAGE, VERSION, usage, AUTHORS, (char const *) NULL); - - while ((optc = getopt_long (argc, argv, "", longopts, NULL)) != -1) - { - switch (optc) - { - case 0: - break; - - default: - usage (EXIT_FAILURE); - } - } + if (getopt (argc, argv, "") != -1) + usage (EXIT_FAILURE); switch (argc - optind) { -- cgit v1.2.3-54-g00ecf