From c2d2dec516bd776d6acba7637d2e9ee721394604 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 1 Feb 1997 02:00:04 +0000 Subject: Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call. --- src/wc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wc.c') diff --git a/src/wc.c b/src/wc.c index e101b9033..114b27dbe 100644 --- 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: -- cgit v1.2.3-54-g00ecf