summaryrefslogtreecommitdiff
path: root/src/wc.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-02-01 02:00:04 +0000
committerJim Meyering <jim@meyering.net>1997-02-01 02:00:04 +0000
commitc2d2dec516bd776d6acba7637d2e9ee721394604 (patch)
tree9c653ac2059ce12ae9004342e22881af2c68794a /src/wc.c
parent1e40423be84cc3e594d7c64c923f39663549dcca (diff)
downloadcoreutils-c2d2dec516bd776d6acba7637d2e9ee721394604.tar.xz
Compare getopt_long return value against -1, not EOF. Use NULL, not '(int *) 0' as last parameter in getopt_long call.
Diffstat (limited to 'src/wc.c')
-rw-r--r--src/wc.c2
1 files changed, 1 insertions, 1 deletions
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: