(parse_long_options): Compare getopt_long return
authorJim Meyering <jim@meyering.net>
Mon, 3 Feb 1997 05:06:27 +0000 (05:06 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 3 Feb 1997 05:06:27 +0000 (05:06 +0000)
value against -1, not EOF.  Use NULL, not `(int *) 0' as last parameter
in getopt_long call.

lib/long-options.c

index cd2c68d..baf2c2a 100644 (file)
@@ -53,7 +53,7 @@ parse_long_options (argc, argv, command_name, package, version, usage)
   opterr = 0;
 
   if (argc == 2
-      && (c = getopt_long (argc, argv, "+", long_options, (int *) 0)) != EOF)
+      && (c = getopt_long (argc, argv, "+", long_options, NULL)) != -1)
     {
       switch (c)
        {