Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0'...
[platform/upstream/coreutils.git] / src / csplit.c
index ddd4311..08546f3 100644 (file)
@@ -1476,8 +1476,7 @@ main (int argc, char **argv)
     signal (SIGTERM, interrupt_handler);
 #endif /* not SA_INTERRUPT */
 
-  while ((optc = getopt_long (argc, argv, "f:b:kn:sqz", longopts, (int *) 0))
-        != EOF)
+  while ((optc = getopt_long (argc, argv, "f:b:kn:sqz", longopts, NULL)) != -1)
     switch (optc)
       {
       case 0: