Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0'...
[platform/upstream/coreutils.git] / src / head.c
index 52aae62..aba3d5c 100644 (file)
@@ -317,8 +317,7 @@ main (int argc, char **argv)
       argc--;
     }
 
-  while ((c = getopt_long (argc, argv, "c:n:qv", long_options, (int *) 0))
-        != EOF)
+  while ((c = getopt_long (argc, argv, "c:n:qv", long_options, NULL)) != -1)
     {
       switch (c)
        {