From: Jim Meyering Date: Sat, 1 Feb 1997 03:05:36 +0000 (+0000) Subject: Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0'... X-Git-Tag: v2.22-rc1~347^2~10^2~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=89105fd3823272827c5a45facab0adc7fc965674;p=thirdparty%2Futil-linux.git Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call. --- diff --git a/login-utils/su.c b/login-utils/su.c index 51e2e8165f..6c8a942fce 100644 --- a/login-utils/su.c +++ b/login-utils/su.c @@ -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) {