diff options
author | Warner Losh <imp@FreeBSD.org> | 1997-03-31 05:11:47 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 1997-03-31 05:11:47 +0000 |
commit | 6c3f552a31dd0a0c8c59a028fd9bc507d43ec5cc (patch) | |
tree | 9dcc58d3fb5e1644413565971c98196650ef87d3 /usr.sbin/sysctl | |
parent | 44ee97a91b095311b8703857d54df336354236a0 (diff) | |
download | src-6c3f552a31dd0a0c8c59a028fd9bc507d43ec5cc.tar.gz src-6c3f552a31dd0a0c8c59a028fd9bc507d43ec5cc.zip |
compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
Notes
Notes:
svn path=/head/; revision=24428
Diffstat (limited to 'usr.sbin/sysctl')
-rw-r--r-- | usr.sbin/sysctl/pathconf.c | 2 | ||||
-rw-r--r-- | usr.sbin/sysctl/sysctl.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/sysctl/pathconf.c b/usr.sbin/sysctl/pathconf.c index 4b60ccfb1c09..8dcaf427114c 100644 --- a/usr.sbin/sysctl/pathconf.c +++ b/usr.sbin/sysctl/pathconf.c @@ -85,7 +85,7 @@ main(argc, argv) char *path; int ch; - while ((ch = getopt(argc, argv, "Aan")) != EOF) { + while ((ch = getopt(argc, argv, "Aan")) != -1) { switch (ch) { case 'A': diff --git a/usr.sbin/sysctl/sysctl.c b/usr.sbin/sysctl/sysctl.c index 2279e300e7f5..b1629f0d2f10 100644 --- a/usr.sbin/sysctl/sysctl.c +++ b/usr.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 <sys/types.h> @@ -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; |