From 141381e1cbdbd8001c13e9e8c0adbfc81d1b3cd0 Mon Sep 17 00:00:00 2001 From: imp Date: Sat, 29 Mar 1997 04:34:07 +0000 Subject: compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic. --- usr.bin/fold/fold.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/fold/fold.c') diff --git a/usr.bin/fold/fold.c b/usr.bin/fold/fold.c index 983a492..dd5b541 100644 --- a/usr.bin/fold/fold.c +++ b/usr.bin/fold/fold.c @@ -60,7 +60,7 @@ main(argc, argv) char *p; width = -1; - while ((ch = getopt(argc, argv, "0123456789w:")) != EOF) + while ((ch = getopt(argc, argv, "0123456789w:")) != -1) switch (ch) { case 'w': if ((width = atoi(optarg)) <= 0) { -- cgit v1.1