Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call.

This commit is contained in:
Jim Meyering 1997-02-01 03:05:36 +00:00
parent 5c0a603f0c
commit 89105fd382
1 changed files with 1 additions and 2 deletions

View 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)
{