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:
parent
5c0a603f0c
commit
89105fd382
|
@ -467,8 +467,7 @@ main (int argc, char **argv)
|
||||||
simulate_login = 0;
|
simulate_login = 0;
|
||||||
change_environment = 1;
|
change_environment = 1;
|
||||||
|
|
||||||
while ((optc = getopt_long (argc, argv, "c:flmps:", longopts, (int *) 0))
|
while ((optc = getopt_long (argc, argv, "c:flmps:", longopts, NULL)) != -1)
|
||||||
!= EOF)
|
|
||||||
{
|
{
|
||||||
switch (optc)
|
switch (optc)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue