From 6c3f552a31dd0a0c8c59a028fd9bc507d43ec5cc Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 31 Mar 1997 05:11:47 +0000 Subject: compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic. --- sbin/sysctl/sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/sysctl/sysctl.c') diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 2279e300e7f5..b1629f0d2f10 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -40,7 +40,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "From: @(#)sysctl.c 8.1 (Berkeley) 6/6/93"; */ static const char rcsid[] = - "$Id$"; + "$Id: sysctl.c,v 1.12 1997/02/22 16:13:58 peter Exp $"; #endif /* not lint */ #include @@ -85,7 +85,7 @@ main(int argc, char **argv) setbuf(stdout,0); setbuf(stderr,0); - while ((ch = getopt(argc, argv, "AabnwX")) != EOF) { + while ((ch = getopt(argc, argv, "AabnwX")) != -1) { switch (ch) { case 'A': Aflag = 1; break; case 'a': aflag = 1; break; -- cgit v1.3