summaryrefslogtreecommitdiff
path: root/sbin/sysctl
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-01-15 23:44:39 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-01-15 23:44:39 +0000
commit552d265b6ced1e56d31f20f16a7fe9ae818d568b (patch)
tree219a59b7e7a5ef53ddfc66cdc38e73e3f79258c8 /sbin/sysctl
parentbf6413046b73005ecca3f5352c8711d00a6d00b9 (diff)
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'sbin/sysctl')
-rw-r--r--sbin/sysctl/pathconf.c2
-rw-r--r--sbin/sysctl/sysctl.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/sbin/sysctl/pathconf.c b/sbin/sysctl/pathconf.c
index ad51f0dfa75..e597f4d255d 100644
--- a/sbin/sysctl/pathconf.c
+++ b/sbin/sysctl/pathconf.c
@@ -91,7 +91,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/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index d4957d72837..799c15dd686 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.c,v 1.4 1996/11/25 08:22:43 mickey Exp $ */
+/* $OpenBSD: sysctl.c,v 1.5 1997/01/15 23:44:22 millert Exp $ */
/* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93";
#else
-static char *rcsid = "$OpenBSD: sysctl.c,v 1.4 1996/11/25 08:22:43 mickey Exp $";
+static char *rcsid = "$OpenBSD: sysctl.c,v 1.5 1997/01/15 23:44:22 millert Exp $";
#endif
#endif /* not lint */
@@ -143,7 +143,7 @@ main(argc, argv)
extern int optind;
int ch, lvl1;
- while ((ch = getopt(argc, argv, "Aanw")) != EOF) {
+ while ((ch = getopt(argc, argv, "Aanw")) != -1) {
switch (ch) {
case 'A':