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/logger/logger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/logger/logger.c') diff --git a/usr.bin/logger/logger.c b/usr.bin/logger/logger.c index 5cb3409..553591f 100644 --- a/usr.bin/logger/logger.c +++ b/usr.bin/logger/logger.c @@ -73,7 +73,7 @@ main(argc, argv) pri = LOG_NOTICE; logflags = 0; unsetenv("TZ"); - while ((ch = getopt(argc, argv, "f:ip:st:")) != EOF) + while ((ch = getopt(argc, argv, "f:ip:st:")) != -1) switch((char)ch) { case 'f': /* file to log */ if (freopen(optarg, "r", stdin) == NULL) { -- cgit v1.1