From 1c8af8787354e20c2b38cab5801698133ff8b403 Mon Sep 17 00:00:00 2001 From: Warner Losh 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/printenv/printenv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/printenv') diff --git a/usr.bin/printenv/printenv.c b/usr.bin/printenv/printenv.c index fc40e3d32444..cf3383774cea 100644 --- a/usr.bin/printenv/printenv.c +++ b/usr.bin/printenv/printenv.c @@ -66,7 +66,7 @@ main(argc, argv) register size_t len; int ch; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: -- cgit v1.2.3