Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0'...
[platform/upstream/coreutils.git] / src / wc.c
index e101b90..114b27d 100644 (file)
--- a/src/wc.c
+++ b/src/wc.c
@@ -269,7 +269,7 @@ main (int argc, char **argv)
   print_lines = print_words = print_chars = 0;
   total_lines = total_words = total_chars = 0;
 
-  while ((optc = getopt_long (argc, argv, "clw", longopts, (int *) 0)) != EOF)
+  while ((optc = getopt_long (argc, argv, "clw", longopts, NULL)) != -1)
     switch (optc)
       {
       case 0: