]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0'...
authorJim Meyering <jim@meyering.net>
Sat, 1 Feb 1997 03:05:36 +0000 (03:05 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 1 Feb 1997 03:05:36 +0000 (03:05 +0000)
login-utils/su.c

index 51e2e8165fa928330029b01db5c5dbd1bd8ea504..6c8a942fce3d8776863847ff2415bb4195f2de35 100644 (file)
@@ -467,8 +467,7 @@ main (int argc, char **argv)
   simulate_login = 0;
   change_environment = 1;
 
-  while ((optc = getopt_long (argc, argv, "c:flmps:", longopts, (int *) 0))
-        != EOF)
+  while ((optc = getopt_long (argc, argv, "c:flmps:", longopts, NULL)) != -1)
     {
       switch (optc)
        {