From: Jim Meyering Date: Mon, 3 Feb 1997 05:06:27 +0000 (+0000) Subject: (parse_long_options): Compare getopt_long return X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3ffd1523ba97e06d9d5620e9cdbb1e4baf9c58c;hp=6290d39a789d7a3628e9e0240e4f3030f616d1bc;p=pspp (parse_long_options): Compare getopt_long return value against -1, not EOF. Use NULL, not `(int *) 0' as last parameter in getopt_long call. --- diff --git a/lib/long-options.c b/lib/long-options.c index cd2c68d64d..baf2c2a1b4 100644 --- a/lib/long-options.c +++ b/lib/long-options.c @@ -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) {