Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0'...
[platform/upstream/coreutils.git] / src / fold.c
index b868102..8d63499 100644 (file)
@@ -276,8 +276,7 @@ main (int argc, char **argv)
        }
     }
 
-  while ((optc = getopt_long (argc, argv, "bsw:", longopts, (int *) 0))
-        != EOF)
+  while ((optc = getopt_long (argc, argv, "bsw:", longopts, NULL)) != -1)
     {
       switch (optc)
        {