diff options
author | Jim Meyering <jim@meyering.net> | 1997-02-01 03:05:36 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-02-01 03:05:36 +0000 |
commit | b8c82a8e39e901c6b231217a009982a0e0b782a6 (patch) | |
tree | ea1086eb40e509ef40ba21c407285ae847e263de /src/who-users.c | |
parent | 4f51b86bfb737aadf750d70b6a7bd4e0ec36962f (diff) | |
download | coreutils-b8c82a8e39e901c6b231217a009982a0e0b782a6.tar.xz |
Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call.
Diffstat (limited to 'src/who-users.c')
-rw-r--r-- | src/who-users.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/who-users.c b/src/who-users.c index a4f5e5b33..4bb76df4b 100644 --- a/src/who-users.c +++ b/src/who-users.c @@ -698,11 +698,12 @@ main (int argc, char **argv) textdomain (PACKAGE); #ifdef WHO - while ((optc = getopt_long (argc, argv, "imqsuwHT", longopts, &longind)) +# define WU_OPTS "imqsuwHT" #else - while ((optc = getopt_long (argc, argv, "", longopts, &longind)) -#endif /* WHO */ - != EOF) +# define WU_OPTS "" +#endif + + while ((optc = getopt_long (argc, argv, WU_OPTS, longopts, &longind)) != -1) { switch (optc) { |