diff options
author | Mike Pechkin <mpech@cvs.openbsd.org> | 2001-10-24 13:06:37 +0000 |
---|---|---|
committer | Mike Pechkin <mpech@cvs.openbsd.org> | 2001-10-24 13:06:37 +0000 |
commit | 9531af194e3d30d1d195cd6cee8ddf4e13f5e668 (patch) | |
tree | 50e73d1a354adfd017b644ec37a53be2492d04a7 /usr.sbin | |
parent | a8300e86e7f5e26893c1db0e382f2f2ce983954c (diff) |
getopt(3) returns -1 when out of args, not EOF.
millert@ ok
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/named/dnsquery/dnsquery.c | 4 | ||||
-rw-r--r-- | usr.sbin/named/named-xfer/named-xfer.c | 8 | ||||
-rw-r--r-- | usr.sbin/tokenadm/tokenadm.c | 4 | ||||
-rw-r--r-- | usr.sbin/tokeninit/tokeninit.c | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/named/dnsquery/dnsquery.c b/usr.sbin/named/dnsquery/dnsquery.c index 26ccf6bda5c..66b82311e53 100644 --- a/usr.sbin/named/dnsquery/dnsquery.c +++ b/usr.sbin/named/dnsquery/dnsquery.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dnsquery.c,v 1.5 2000/02/01 03:24:02 deraadt Exp $ */ +/* $OpenBSD: dnsquery.c,v 1.6 2001/10/24 13:06:36 mpech Exp $ */ #include <stdio.h> #include <sys/types.h> @@ -43,7 +43,7 @@ char *argv[]; } /* handle args */ - while ((c = getopt(argc, argv, "c:dh:n:p:r:st:u:v")) != EOF) { + while ((c = getopt(argc, argv, "c:dh:n:p:r:st:u:v")) != -1) { switch (c) { case 'r' : _res.retry = atoi(optarg); diff --git a/usr.sbin/named/named-xfer/named-xfer.c b/usr.sbin/named/named-xfer/named-xfer.c index ba4b5cdf887..858028dce61 100644 --- a/usr.sbin/named/named-xfer/named-xfer.c +++ b/usr.sbin/named/named-xfer/named-xfer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: named-xfer.c,v 1.7 1998/08/16 21:20:03 millert Exp $ */ +/* $OpenBSD: named-xfer.c,v 1.8 2001/10/24 13:06:36 mpech Exp $ */ /* * The original version of xfer by Kevin Dunlap. @@ -97,7 +97,7 @@ char copyright[] = static char sccsid[] = "@(#)named-xfer.c 4.18 (Berkeley) 3/7/91"; static char rcsid[] = "$From: named-xfer.c,v 8.24 1998/04/07 04:59:45 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: named-xfer.c,v 1.7 1998/08/16 21:20:03 millert Exp $"; +static char rcsid[] = "$OpenBSD: named-xfer.c,v 1.8 2001/10/24 13:06:36 mpech Exp $"; #endif #endif /* not lint */ @@ -221,9 +221,9 @@ main(argc, argv) openlog(ProgName, LOG_PID); #endif #ifdef STUBS - while ((c = getopt(argc, argv, "C:d:l:s:t:z:f:p:P:qS")) != EOF) + while ((c = getopt(argc, argv, "C:d:l:s:t:z:f:p:P:qS")) != -1) #else - while ((c = getopt(argc, argv, "C:d:l:s:t:z:f:p:P:q")) != EOF) + while ((c = getopt(argc, argv, "C:d:l:s:t:z:f:p:P:q")) != -1) #endif switch (c) { #ifdef GEN_AXFR diff --git a/usr.sbin/tokenadm/tokenadm.c b/usr.sbin/tokenadm/tokenadm.c index 2385a922458..6ba981fc475 100644 --- a/usr.sbin/tokenadm/tokenadm.c +++ b/usr.sbin/tokenadm/tokenadm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tokenadm.c,v 1.2 2001/05/30 20:43:02 markus Exp $ */ +/* $OpenBSD: tokenadm.c,v 1.3 2001/10/24 13:06:36 mpech Exp $ */ /*- * Copyright (c) 1995 Migration Associates Corp. All Rights Reserved @@ -102,7 +102,7 @@ main(int argc, char **argv) if (setrlimit(RLIMIT_CORE, &cds) < 0) syslog(LOG_ERR, "couldn't set core dump size to 0: %m"); - while ((c = getopt(argc, argv, "BDERT1bdem:ru")) != EOF) + while ((c = getopt(argc, argv, "BDERT1bdem:ru")) != -1) switch (c) { case 'B': if (what != LIST) diff --git a/usr.sbin/tokeninit/tokeninit.c b/usr.sbin/tokeninit/tokeninit.c index 97f220f535b..2e56de30d05 100644 --- a/usr.sbin/tokeninit/tokeninit.c +++ b/usr.sbin/tokeninit/tokeninit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tokeninit.c,v 1.2 2000/12/20 20:08:22 markus Exp $ */ +/* $OpenBSD: tokeninit.c,v 1.3 2001/10/24 13:06:36 mpech Exp $ */ /*- * Copyright (c) 1995 Migration Associates Corp. All Rights Reserved @@ -89,7 +89,7 @@ main(int argc, char **argv) else optstr = "fm:sv"; - while ((c = getopt(argc, argv, optstr)) != EOF) + while ((c = getopt(argc, argv, optstr)) != -1) switch (c) { case 'f': /* force initialize existing user account */ cmd |= TOKEN_FORCEINIT; |