diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-15 23:44:39 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-15 23:44:39 +0000 |
commit | 552d265b6ced1e56d31f20f16a7fe9ae818d568b (patch) | |
tree | 219a59b7e7a5ef53ddfc66cdc38e73e3f79258c8 /usr.sbin | |
parent | bf6413046b73005ecca3f5352c8711d00a6d00b9 (diff) |
getopt(3) returns -1 when out of args, not EOF, whee!
Diffstat (limited to 'usr.sbin')
51 files changed, 108 insertions, 108 deletions
diff --git a/usr.sbin/ac/ac.c b/usr.sbin/ac/ac.c index 96a14372d40..8bc2c1ac7b9 100644 --- a/usr.sbin/ac/ac.c +++ b/usr.sbin/ac/ac.c @@ -14,7 +14,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ac.c,v 1.2 1996/08/29 03:32:19 deraadt Exp $"; +static char rcsid[] = "$Id: ac.c,v 1.3 1997/01/15 23:43:44 millert Exp $"; #endif #include <sys/types.h> @@ -226,7 +226,7 @@ main(argc, argv) int c; fp = NULL; - while ((c = getopt(argc, argv, "Dc:dpt:w:")) != EOF) { + while ((c = getopt(argc, argv, "Dc:dpt:w:")) != -1) { switch (c) { #ifdef DEBUG case 'D': diff --git a/usr.sbin/amd/amd/get_args.c b/usr.sbin/amd/amd/get_args.c index 4de3e410b85..30d6c846c8d 100644 --- a/usr.sbin/amd/amd/get_args.c +++ b/usr.sbin/amd/amd/get_args.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)get_args.c 8.1 (Berkeley) 6/6/93 - * $Id: get_args.c,v 1.1 1995/10/18 08:47:10 deraadt Exp $ + * $Id: get_args.c,v 1.2 1997/01/15 23:43:45 millert Exp $ */ /* @@ -111,7 +111,7 @@ char *v[]; char *logfile = 0; char *sub_domain = 0; - while ((opt_ch = getopt(c, v, "mnprva:c:d:h:k:l:t:w:x:y:C:D:")) != EOF) + while ((opt_ch = getopt(c, v, "mnprva:c:d:h:k:l:t:w:x:y:C:D:")) != -1) switch (opt_ch) { case 'a': if (*optarg != '/') { diff --git a/usr.sbin/amd/amq/amq.c b/usr.sbin/amd/amq/amq.c index 7419b596e30..c4f4989c98a 100644 --- a/usr.sbin/amd/amq/amq.c +++ b/usr.sbin/amd/amq/amq.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)amq.c 8.1 (Berkeley) 6/7/93 - * $Id: amq.c,v 1.4 1996/08/13 06:06:53 deraadt Exp $ + * $Id: amq.c,v 1.5 1997/01/15 23:43:46 millert Exp $ */ /* @@ -52,7 +52,7 @@ char copyright[] = "\ #endif /* not lint */ #ifndef lint -static char rcsid[] = "$Id: amq.c,v 1.4 1996/08/13 06:06:53 deraadt Exp $"; +static char rcsid[] = "$Id: amq.c,v 1.5 1997/01/15 23:43:46 millert Exp $"; static char sccsid[] = "@(#)amq.c 8.1 (Berkeley) 6/7/93"; #endif /* not lint */ @@ -308,7 +308,7 @@ char *argv[]; /* * Parse arguments */ - while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:")) != EOF) + while ((opt_ch = getopt(argc, argv, "fh:l:msuvx:D:M:")) != -1) switch (opt_ch) { case 'f': flush_flag = 1; diff --git a/usr.sbin/amd/fsinfo/fsinfo.c b/usr.sbin/amd/fsinfo/fsinfo.c index 480cef4d456..6ffaa3b5a4f 100644 --- a/usr.sbin/amd/fsinfo/fsinfo.c +++ b/usr.sbin/amd/fsinfo/fsinfo.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)fsinfo.c 8.1 (Berkeley) 6/6/93 - * $Id: fsinfo.c,v 1.2 1996/10/26 20:10:20 millert Exp $ + * $Id: fsinfo.c,v 1.3 1997/01/15 23:43:47 millert Exp $ */ #ifndef lint @@ -104,7 +104,7 @@ char *v[]; if (!progname) progname = "fsinfo"; - while ((ch = getopt(c, v, "a:b:d:e:f:h:m:D:U:I:qv")) != EOF) + while ((ch = getopt(c, v, "a:b:d:e:f:h:m:D:U:I:qv")) != -1) switch (ch) { case 'a': autodir = optarg; diff --git a/usr.sbin/amd/mk-amd-map/mk-amd-map.c b/usr.sbin/amd/mk-amd-map/mk-amd-map.c index 47806893699..df10c4fd1ac 100644 --- a/usr.sbin/amd/mk-amd-map/mk-amd-map.c +++ b/usr.sbin/amd/mk-amd-map/mk-amd-map.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93 - * $Id: mk-amd-map.c,v 1.1 1995/10/18 08:47:22 deraadt Exp $ + * $Id: mk-amd-map.c,v 1.2 1997/01/15 23:43:48 millert Exp $ */ /* @@ -52,7 +52,7 @@ char copyright[] = "\ #endif /* not lint */ #ifndef lint -static char rcsid[] = "$Id: mk-amd-map.c,v 1.1 1995/10/18 08:47:22 deraadt Exp $"; +static char rcsid[] = "$Id: mk-amd-map.c,v 1.2 1997/01/15 23:43:48 millert Exp $"; static char sccsid[] = "@(#)mk-amd-map.c 8.1 (Berkeley) 6/28/93"; #endif /* not lint */ @@ -248,7 +248,7 @@ char *argv[]; int ch; extern int optind; - while ((ch = getopt(argc, argv, "p")) != EOF) + while ((ch = getopt(argc, argv, "p")) != -1) switch (ch) { case 'p': printit = 1; diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index d2c329021ec..9af01e5b57f 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -97,7 +97,7 @@ main(argc, argv) int ch; pid = getpid(); - while ((ch = getopt(argc, argv, "andsf")) != EOF) + while ((ch = getopt(argc, argv, "andsf")) != -1) switch((char)ch) { case 'a': dump(0); diff --git a/usr.sbin/catman/catman.c b/usr.sbin/catman/catman.c index d6e36008266..cddaba6e16f 100644 --- a/usr.sbin/catman/catman.c +++ b/usr.sbin/catman/catman.c @@ -29,7 +29,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: catman.c,v 1.1 1995/10/18 08:47:29 deraadt Exp $"; +static char rcsid[] = "$Id: catman.c,v 1.2 1997/01/15 23:43:49 millert Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -70,7 +70,7 @@ main(argc, argv) { int c; - while ((c = getopt(argc, argv, "knpswM:")) != EOF) { + while ((c = getopt(argc, argv, "knpswM:")) != -1) { switch (c) { case 'k': f_ignerr = 1; diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c index cc3a69eaad8..3c437c24f37 100644 --- a/usr.sbin/chown/chown.c +++ b/usr.sbin/chown/chown.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)chown.c 8.8 (Berkeley) 4/4/94"; */ -static char *rcsid = "$Id: chown.c,v 1.1 1995/10/18 08:47:29 deraadt Exp $"; +static char *rcsid = "$Id: chown.c,v 1.2 1997/01/15 23:43:52 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -82,7 +82,7 @@ main(argc, argv) ischown = myname[2] == 'o'; Hflag = Lflag = Pflag = hflag = 0; - while ((ch = getopt(argc, argv, "HLPRfh")) != EOF) + while ((ch = getopt(argc, argv, "HLPRfh")) != -1) switch (ch) { case 'H': Hflag = 1; diff --git a/usr.sbin/config.old/main.c b/usr.sbin/config.old/main.c index 7e434a7d987..b1e94dbfd2d 100644 --- a/usr.sbin/config.old/main.c +++ b/usr.sbin/config.old/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.2 1997/01/12 07:43:33 downsj Exp $ */ +/* $OpenBSD: main.c,v 1.3 1997/01/15 23:43:54 millert Exp $ */ /* $NetBSD: main.c,v 1.14 1996/06/10 02:32:24 thorpej Exp $ */ /* @@ -71,7 +71,7 @@ main(argc, argv) char *p; fatal_errors =1; - while ((ch = getopt(argc, argv, "gpk")) != EOF) + while ((ch = getopt(argc, argv, "gpk")) != -1) switch (ch) { case 'g': debugging++; diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index 9b1aade9a45..5d7aa13a19d 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.8 1996/10/23 22:37:53 niklas Exp $ */ +/* $OpenBSD: main.c,v 1.9 1997/01/15 23:43:53 millert Exp $ */ /* $NetBSD: main.c,v 1.18 1996/08/31 20:58:20 mycroft Exp $ */ /* @@ -92,7 +92,7 @@ main(argc, argv) int pflag, ch; pflag = 0; - while ((ch = getopt(argc, argv, "gpb:s:")) != EOF) { + while ((ch = getopt(argc, argv, "gpb:s:")) != -1) { switch (ch) { case 'g': diff --git a/usr.sbin/ctm/mkCTM/mkctm.c b/usr.sbin/ctm/mkCTM/mkctm.c index f9dfcb7e88f..e08c82b59e8 100644 --- a/usr.sbin/ctm/mkCTM/mkctm.c +++ b/usr.sbin/ctm/mkCTM/mkctm.c @@ -502,7 +502,7 @@ main(int argc, char **argv) err(1,"Default regular expression argument to -I is botched"); flag_ignore = 1; - while ((i = getopt(argc,argv,"D:I:B:qv")) != EOF) + while ((i = getopt(argc,argv,"D:I:B:qv")) != -1) switch (i) { case 'D': damage_limit = strtol(optarg,0,0); diff --git a/usr.sbin/dev_mkdb/dev_mkdb.c b/usr.sbin/dev_mkdb/dev_mkdb.c index 4a0e17c7171..c23f3d0c750 100644 --- a/usr.sbin/dev_mkdb/dev_mkdb.c +++ b/usr.sbin/dev_mkdb/dev_mkdb.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)dev_mkdb.c 8.1 (Berkeley) 6/6/93";*/ -static char rcsid[] = "$Id: dev_mkdb.c,v 1.2 1996/08/29 03:33:19 deraadt Exp $"; +static char rcsid[] = "$Id: dev_mkdb.c,v 1.3 1997/01/15 23:43:55 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -78,7 +78,7 @@ main(argc, argv) u_char buf[MAXNAMLEN + 1]; char dbtmp[MAXPATHLEN + 1], dbname[MAXPATHLEN + 1]; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch((char)ch) { case '?': default: diff --git a/usr.sbin/grfinfo/grfinfo.c b/usr.sbin/grfinfo/grfinfo.c index e051d4c43be..9ab8bbc9c80 100644 --- a/usr.sbin/grfinfo/grfinfo.c +++ b/usr.sbin/grfinfo/grfinfo.c @@ -19,7 +19,7 @@ * improvements that they make and grant CSS redistribution rights. * * from: Utah $Hdr: grfinfo.c 1.3 94/04/04$ - * $Id: grfinfo.c,v 1.1 1995/10/18 08:47:34 deraadt Exp $ + * $Id: grfinfo.c,v 1.2 1997/01/15 23:43:56 millert Exp $ */ #include <stdio.h> @@ -52,7 +52,7 @@ main(argc, argv) register int c; pname = argv[0]; - while ((c = getopt(argc, argv, "at")) != EOF) + while ((c = getopt(argc, argv, "at")) != -1) switch (c) { /* everything */ case 'a': diff --git a/usr.sbin/gspa/gspa/gspa.c b/usr.sbin/gspa/gspa/gspa.c index 49c891175b0..94cbc82c38b 100644 --- a/usr.sbin/gspa/gspa/gspa.c +++ b/usr.sbin/gspa/gspa/gspa.c @@ -83,7 +83,7 @@ main(int argc, char **argv) hex_name = list_name = 0; /* parse options */ - while ((c = getopt(argc, argv, "o:l:")) != EOF) { + while ((c = getopt(argc, argv, "o:l:")) != -1) { switch (c) { case 'o': if (hex_name) diff --git a/usr.sbin/hilinfo/hilinfo.c b/usr.sbin/hilinfo/hilinfo.c index 5cf867bc45a..0d322b034be 100644 --- a/usr.sbin/hilinfo/hilinfo.c +++ b/usr.sbin/hilinfo/hilinfo.c @@ -19,7 +19,7 @@ * improvements that they make and grant CSS redistribution rights. * * from: Utah $Hdr: hilinfo.c 1.3 94/04/04$ - * $Id: hilinfo.c,v 1.1 1995/10/18 08:47:35 deraadt Exp $ + * $Id: hilinfo.c,v 1.2 1997/01/15 23:43:58 millert Exp $ */ #include <stdio.h> @@ -57,7 +57,7 @@ main(argc, argv) int multi; pname = argv[0]; - while ((c = getopt(argc, argv, "at")) != EOF) + while ((c = getopt(argc, argv, "at")) != -1) switch (c) { /* everything */ case 'a': diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index 9f8f105aa59..549f14e7739 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inetd.c,v 1.23 1996/12/14 19:19:09 deraadt Exp $ */ +/* $OpenBSD: inetd.c,v 1.24 1997/01/15 23:43:59 millert Exp $ */ /* $NetBSD: inetd.c,v 1.11 1996/02/22 11:14:41 mycroft Exp $ */ /* * Copyright (c) 1983,1991 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/ -static char rcsid[] = "$OpenBSD: inetd.c,v 1.23 1996/12/14 19:19:09 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: inetd.c,v 1.24 1997/01/15 23:43:59 millert Exp $"; #endif /* not lint */ /* @@ -289,7 +289,7 @@ main(argc, argv, envp) progname = strrchr(argv[0], '/'); progname = progname ? progname + 1 : argv[0]; - while ((ch = getopt(argc, argv, "d")) != EOF) + while ((ch = getopt(argc, argv, "d")) != -1) switch(ch) { case 'd': debug = 1; diff --git a/usr.sbin/iostat/iostat.c b/usr.sbin/iostat/iostat.c index f038f6e113a..8b3ff50cb46 100644 --- a/usr.sbin/iostat/iostat.c +++ b/usr.sbin/iostat/iostat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iostat.c,v 1.6 1996/12/22 03:28:56 deraadt Exp $ */ +/* $OpenBSD: iostat.c,v 1.7 1997/01/15 23:44:01 millert Exp $ */ /* $NetBSD: iostat.c,v 1.10 1996/10/25 18:21:58 scottr Exp $ */ /* @@ -131,7 +131,7 @@ main(argc, argv) int ch, hdrcnt; struct timeval tv; - while ((ch = getopt(argc, argv, "Cc:dDIM:N:Tw:")) != EOF) + while ((ch = getopt(argc, argv, "Cc:dDIM:N:Tw:")) != -1) switch(ch) { case 'c': if ((reps = atoi(optarg)) <= 0) diff --git a/usr.sbin/kgmon/kgmon.c b/usr.sbin/kgmon/kgmon.c index bcedb0bcb61..f1e11503d74 100644 --- a/usr.sbin/kgmon/kgmon.c +++ b/usr.sbin/kgmon/kgmon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kgmon.c,v 1.2 1996/05/01 22:15:24 niklas Exp $ */ +/* $OpenBSD: kgmon.c,v 1.3 1997/01/15 23:44:02 millert Exp $ */ /* * Copyright (c) 1983, 1992, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)kgmon.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$OpenBSD: kgmon.c,v 1.2 1996/05/01 22:15:24 niklas Exp $"; +static char *rcsid = "$OpenBSD: kgmon.c,v 1.3 1997/01/15 23:44:02 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -89,7 +89,7 @@ main(int argc, char **argv) seteuid(getuid()); kmemf = NULL; system = NULL; - while ((ch = getopt(argc, argv, "M:N:bhpr")) != EOF) { + while ((ch = getopt(argc, argv, "M:N:bhpr")) != -1) { switch((char)ch) { case 'M': diff --git a/usr.sbin/mopd/mopchk/mopchk.c b/usr.sbin/mopd/mopchk/mopchk.c index 42820267bb6..a9121118658 100644 --- a/usr.sbin/mopd/mopchk/mopchk.c +++ b/usr.sbin/mopd/mopchk/mopchk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mopchk.c,v 1.2 1996/09/21 19:12:18 maja Exp $ +/* $OpenBSD: mopchk.c,v 1.3 1997/01/15 23:44:27 millert Exp $ /* * Copyright (c) 1995-96 Mats O Jansson. All rights reserved. @@ -30,7 +30,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: mopchk.c,v 1.2 1996/09/21 19:12:18 maja Exp $"; +static char rcsid[] = "$OpenBSD: mopchk.c,v 1.3 1997/01/15 23:44:27 millert Exp $"; #endif /* @@ -89,7 +89,7 @@ main(argc, argv) openlog(Program, LOG_PID | LOG_CONS, LOG_DAEMON); opterr = 0; - while ((op = getopt(argc, argv, "av")) != EOF) { + while ((op = getopt(argc, argv, "av")) != -1) { switch (op) { case 'a': AllFlag++; diff --git a/usr.sbin/mopd/mopd/mopd.c b/usr.sbin/mopd/mopd/mopd.c index 5e4be97afd8..3c4773db312 100644 --- a/usr.sbin/mopd/mopd/mopd.c +++ b/usr.sbin/mopd/mopd/mopd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mopd.c,v 1.2 1996/09/21 19:12:24 maja Exp $ */ +/* $OpenBSD: mopd.c,v 1.3 1997/01/15 23:44:28 millert Exp $ */ /* * Copyright (c) 1993-96 Mats O Jansson. All rights reserved. @@ -30,7 +30,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: mopd.c,v 1.2 1996/09/21 19:12:24 maja Exp $"; +static char rcsid[] = "$OpenBSD: mopd.c,v 1.3 1997/01/15 23:44:28 millert Exp $"; #endif /* @@ -96,7 +96,7 @@ main(argc, argv) if (*Program == '-') Program++; - while ((c = getopt(argc, argv, "34adfv")) != EOF) + while ((c = getopt(argc, argv, "34adfv")) != -1) switch (c) { case '3': Not3Flag++; diff --git a/usr.sbin/mopd/mopprobe/mopprobe.c b/usr.sbin/mopd/mopprobe/mopprobe.c index 90dd880b512..a5bae7d915c 100644 --- a/usr.sbin/mopd/mopprobe/mopprobe.c +++ b/usr.sbin/mopd/mopprobe/mopprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mopprobe.c,v 1.2 1996/09/21 19:12:35 maja Exp $ */ +/* $OpenBSD: mopprobe.c,v 1.3 1997/01/15 23:44:29 millert Exp $ */ /* * Copyright (c) 1993-96 Mats O Jansson. All rights reserved. @@ -30,7 +30,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: mopprobe.c,v 1.2 1996/09/21 19:12:35 maja Exp $"; +static char rcsid[] = "$OpenBSD: mopprobe.c,v 1.3 1997/01/15 23:44:29 millert Exp $"; #endif /* @@ -95,7 +95,7 @@ main(argc, argv) openlog(Program, LOG_PID | LOG_CONS, LOG_DAEMON); opterr = 0; - while ((op = getopt(argc, argv, "ado")) != EOF) { + while ((op = getopt(argc, argv, "ado")) != -1) { switch (op) { case '3': Not3Flag++; diff --git a/usr.sbin/mopd/moptrace/moptrace.c b/usr.sbin/mopd/moptrace/moptrace.c index 08bd79c8c98..d529e939ae7 100644 --- a/usr.sbin/mopd/moptrace/moptrace.c +++ b/usr.sbin/mopd/moptrace/moptrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: moptrace.c,v 1.2 1996/09/21 19:12:39 maja Exp $ */ +/* $OpenBSD: moptrace.c,v 1.3 1997/01/15 23:44:30 millert Exp $ */ /* * Copyright (c) 1993-95 Mats O Jansson. All rights reserved. @@ -30,7 +30,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: moptrace.c,v 1.2 1996/09/21 19:12:39 maja Exp $"; +static char rcsid[] = "$OpenBSD: moptrace.c,v 1.3 1997/01/15 23:44:30 millert Exp $"; #endif /* @@ -95,7 +95,7 @@ main(argc, argv) openlog(Program, LOG_PID | LOG_CONS, LOG_DAEMON); opterr = 0; - while ((op = getopt(argc, argv, "34ad")) != EOF) { + while ((op = getopt(argc, argv, "34ad")) != -1) { switch (op) { case '3': Not3Flag++; diff --git a/usr.sbin/mtree/mtree.c b/usr.sbin/mtree/mtree.c index fb2423c5f12..162e8ddbd4e 100644 --- a/usr.sbin/mtree/mtree.c +++ b/usr.sbin/mtree/mtree.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mtree.c,v 1.4 1997/01/03 21:40:50 millert Exp $ */ +/* $OpenBSD: mtree.c,v 1.5 1997/01/15 23:44:03 millert Exp $ */ /* $NetBSD: mtree.c,v 1.7 1996/09/05 23:29:22 thorpej Exp $ */ /*- @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mtree.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: mtree.c,v 1.4 1997/01/03 21:40:50 millert Exp $"; +static char rcsid[] = "$OpenBSD: mtree.c,v 1.5 1997/01/15 23:44:03 millert Exp $"; #endif #endif /* not lint */ @@ -79,7 +79,7 @@ main(argc, argv) dir = NULL; keys = KEYDEFAULT; - while ((ch = getopt(argc, argv, "cdef:iK:k:np:rs:tUux")) != EOF) + while ((ch = getopt(argc, argv, "cdef:iK:k:np:rs:tUux")) != -1) switch((char)ch) { case 'c': cflag = 1; diff --git a/usr.sbin/named/dnsquery/dnsquery.c b/usr.sbin/named/dnsquery/dnsquery.c index c6401467781..93478663990 100644 --- a/usr.sbin/named/dnsquery/dnsquery.c +++ b/usr.sbin/named/dnsquery/dnsquery.c @@ -44,7 +44,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 98363bc2c8a..d8e981df9c3 100644 --- a/usr.sbin/named/named-xfer/named-xfer.c +++ b/usr.sbin/named/named-xfer/named-xfer.c @@ -181,9 +181,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/named/xfer/named-xfer.c b/usr.sbin/named/xfer/named-xfer.c index db41f0ccbf5..1b72e36d379 100644 --- a/usr.sbin/named/xfer/named-xfer.c +++ b/usr.sbin/named/xfer/named-xfer.c @@ -44,7 +44,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)named-xfer.c 4.18 (Berkeley) 3/7/91";*/ -static char rcsid[] = "$Id: named-xfer.c,v 1.1 1995/10/18 08:47:56 deraadt Exp $"; +static char rcsid[] = "$Id: named-xfer.c,v 1.2 1997/01/15 23:44:07 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -111,7 +111,7 @@ main(argc, argv) #else openlog("named-xfer", LOG_PID); #endif - while ((c = getopt(argc, argv, "d:l:s:t:z:f:p:P:q")) != EOF) + while ((c = getopt(argc, argv, "d:l:s:t:z:f:p:P:q")) != -1) switch (c) { case 'd': debug = atoi(optarg); diff --git a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c index c48c92c47cc..25142f6d031 100644 --- a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c +++ b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. */ #ifndef lint -static char *rcsid = "$Id: netgroup_mkdb.c,v 1.2 1996/05/01 13:32:21 deraadt Exp $"; +static char *rcsid = "$Id: netgroup_mkdb.c,v 1.3 1997/01/15 23:44:08 millert Exp $"; #endif #include <sys/types.h> @@ -104,7 +104,7 @@ main(argc, argv) char *fname = _PATH_NETGROUP; - while ((ch = getopt(argc, argv, "do:")) != EOF) + while ((ch = getopt(argc, argv, "do:")) != -1) switch (ch) { #ifdef DEBUG_NG case 'd': diff --git a/usr.sbin/pkg_install/add/main.c b/usr.sbin/pkg_install/add/main.c index 77f61d54bfe..3127dd5bce4 100644 --- a/usr.sbin/pkg_install/add/main.c +++ b/usr.sbin/pkg_install/add/main.c @@ -1,7 +1,7 @@ -/* $OpenBSD: main.c,v 1.2 1996/06/04 08:43:34 niklas Exp $ */ +/* $OpenBSD: main.c,v 1.3 1997/01/15 23:44:09 millert Exp $ */ #ifndef lint -static char *rcsid = "$OpenBSD: main.c,v 1.2 1996/06/04 08:43:34 niklas Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.3 1997/01/15 23:44:09 millert Exp $"; #endif /* @@ -56,7 +56,7 @@ main(int argc, char **argv) char *prog_name = argv[0], *cp; start = argv; - while ((ch = getopt(argc, argv, Options)) != EOF) { + while ((ch = getopt(argc, argv, Options)) != -1) { switch(ch) { case 'v': Verbose = TRUE; diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c index 5d318d0edd8..0596b181f21 100644 --- a/usr.sbin/pkg_install/create/main.c +++ b/usr.sbin/pkg_install/create/main.c @@ -1,7 +1,7 @@ -/* $OpenBSD: main.c,v 1.3 1996/12/29 12:18:27 graichen Exp $ */ +/* $OpenBSD: main.c,v 1.4 1997/01/15 23:44:10 millert Exp $ */ #ifndef lint -static const char *rcsid = "$OpenBSD: main.c,v 1.3 1996/12/29 12:18:27 graichen Exp $"; +static const char *rcsid = "$OpenBSD: main.c,v 1.4 1997/01/15 23:44:10 millert Exp $"; #endif /* @@ -43,7 +43,7 @@ main(int argc, char **argv) char *prog_name = argv[0]; pkgs = start = argv; - while ((ch = getopt(argc, argv, Options)) != EOF) + while ((ch = getopt(argc, argv, Options)) != -1) switch(ch) { case 'v': Verbose = TRUE; diff --git a/usr.sbin/pkg_install/delete/main.c b/usr.sbin/pkg_install/delete/main.c index 871f2e8d480..98434f0852b 100644 --- a/usr.sbin/pkg_install/delete/main.c +++ b/usr.sbin/pkg_install/delete/main.c @@ -1,7 +1,7 @@ -/* $OpenBSD: main.c,v 1.2 1996/06/04 08:43:37 niklas Exp $ */ +/* $OpenBSD: main.c,v 1.3 1997/01/15 23:44:10 millert Exp $ */ #ifndef lint -static char *rcsid = "$OpenBSD: main.c,v 1.2 1996/06/04 08:43:37 niklas Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.3 1997/01/15 23:44:10 millert Exp $"; #endif /* @@ -43,7 +43,7 @@ main(int argc, char **argv) char *prog_name = argv[0]; pkgs = start = argv; - while ((ch = getopt(argc, argv, Options)) != EOF) + while ((ch = getopt(argc, argv, Options)) != -1) switch(ch) { case 'v': Verbose = TRUE; diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c index f2b0edeb483..1c2cb187869 100644 --- a/usr.sbin/pkg_install/info/main.c +++ b/usr.sbin/pkg_install/info/main.c @@ -1,7 +1,7 @@ -/* $OpenBSD: main.c,v 1.2 1996/06/04 08:43:39 niklas Exp $ */ +/* $OpenBSD: main.c,v 1.3 1997/01/15 23:44:11 millert Exp $ */ #ifndef lint -static char *rcsid = "$OpenBSD: main.c,v 1.2 1996/06/04 08:43:39 niklas Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.3 1997/01/15 23:44:11 millert Exp $"; #endif /* @@ -45,7 +45,7 @@ main(int argc, char **argv) char *prog_name = argv[0]; pkgs = start = argv; - while ((ch = getopt(argc, argv, Options)) != EOF) + while ((ch = getopt(argc, argv, Options)) != -1) switch(ch) { case 'a': AllInstalled = TRUE; diff --git a/usr.sbin/portmap/portmap.c b/usr.sbin/portmap/portmap.c index a61a06b2def..f5621c236a9 100644 --- a/usr.sbin/portmap/portmap.c +++ b/usr.sbin/portmap/portmap.c @@ -40,7 +40,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)portmap.c 5.4 (Berkeley) 4/19/91";*/ -static char rcsid[] = "$Id: portmap.c,v 1.11 1996/10/06 04:13:12 deraadt Exp $"; +static char rcsid[] = "$Id: portmap.c,v 1.12 1997/01/15 23:44:12 millert Exp $"; #endif /* not lint */ /* @@ -121,7 +121,7 @@ main(argc, argv) int len = sizeof(struct sockaddr_in); register struct pmaplist *pml; - while ((c = getopt(argc, argv, "d")) != EOF) { + while ((c = getopt(argc, argv, "d")) != -1) { switch (c) { case 'd': diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index ec58dd73f1e..0d22bd53db1 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.c +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pwd_mkdb.c,v 1.8 1996/10/16 09:16:14 downsj Exp $ */ +/* $OpenBSD: pwd_mkdb.c,v 1.9 1997/01/15 23:44:14 millert Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)pwd_mkdb.c 8.5 (Berkeley) 4/20/94";*/ -static char *rcsid = "$Id: pwd_mkdb.c,v 1.8 1996/10/16 09:16:14 downsj Exp $"; +static char *rcsid = "$Id: pwd_mkdb.c,v 1.9 1997/01/15 23:44:14 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -103,7 +103,7 @@ main(argc, argv) DBT ypdata, ypkey; makeold = 0; - while ((ch = getopt(argc, argv, "cpvd:")) != EOF) + while ((ch = getopt(argc, argv, "cpvd:")) != -1) switch(ch) { case 'c': /* verify only */ cflag = 1; diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c index 7cba3473198..9847ffde373 100644 --- a/usr.sbin/rarpd/rarpd.c +++ b/usr.sbin/rarpd/rarpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rarpd.c,v 1.5 1996/08/12 23:42:12 deraadt Exp $ */ +/* $OpenBSD: rarpd.c,v 1.6 1997/01/15 23:44:15 millert Exp $ */ /* $NetBSD: rarpd.c,v 1.12 1996/03/21 18:28:23 jtc Exp $ */ /* @@ -28,7 +28,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char rcsid[] = "$OpenBSD: rarpd.c,v 1.5 1996/08/12 23:42:12 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rarpd.c,v 1.6 1997/01/15 23:44:15 millert Exp $"; #endif @@ -125,7 +125,7 @@ main(argc, argv) openlog(name, LOG_PID | LOG_CONS, LOG_DAEMON); opterr = 0; - while ((op = getopt(argc, argv, "adf")) != EOF) { + while ((op = getopt(argc, argv, "adf")) != -1) { switch (op) { case 'a': ++aflag; diff --git a/usr.sbin/rbootd/rbootd.c b/usr.sbin/rbootd/rbootd.c index 11d5445911a..45d693aa48f 100644 --- a/usr.sbin/rbootd/rbootd.c +++ b/usr.sbin/rbootd/rbootd.c @@ -98,7 +98,7 @@ main(argc, argv) /* * Parse any arguments. */ - while ((c = getopt(argc, argv, "adi:")) != EOF) + while ((c = getopt(argc, argv, "adi:")) != -1) switch(c) { case 'a': BootAny++; diff --git a/usr.sbin/sendmail/contrib/bitdomain.c b/usr.sbin/sendmail/contrib/bitdomain.c index 52d6d2187c3..ec79b9506e4 100644 --- a/usr.sbin/sendmail/contrib/bitdomain.c +++ b/usr.sbin/sendmail/contrib/bitdomain.c @@ -51,7 +51,7 @@ char **argv; { int opt; - while ((opt = getopt(argc, argv, "o:")) != EOF) { + while ((opt = getopt(argc, argv, "o:")) != -1) { switch (opt) { case 'o': if (!freopen(optarg, "w", stdout)) { diff --git a/usr.sbin/sendmail/mailstats/mailstats.c b/usr.sbin/sendmail/mailstats/mailstats.c index 83082bacb75..a003ea00b52 100644 --- a/usr.sbin/sendmail/mailstats/mailstats.c +++ b/usr.sbin/sendmail/mailstats/mailstats.c @@ -73,7 +73,7 @@ main(argc, argv) cfile = _PATH_SENDMAILCF; sfile = NULL; mnames = TRUE; - while ((ch = getopt(argc, argv, "C:f:o")) != EOF) + while ((ch = getopt(argc, argv, "C:f:o")) != -1) { switch (ch) { diff --git a/usr.sbin/sendmail/makemap/makemap.c b/usr.sbin/sendmail/makemap/makemap.c index 2e289a81641..90f5d515a36 100644 --- a/usr.sbin/sendmail/makemap/makemap.c +++ b/usr.sbin/sendmail/makemap/makemap.c @@ -129,7 +129,7 @@ main(argc, argv) #else #define OPTIONS "Ndforv" #endif - while ((opt = getopt(argc, argv, OPTIONS)) != EOF) + while ((opt = getopt(argc, argv, OPTIONS)) != -1) { switch (opt) { diff --git a/usr.sbin/sendmail/praliases/praliases.c b/usr.sbin/sendmail/praliases/praliases.c index 2c1cc0a07de..10b022a4737 100644 --- a/usr.sbin/sendmail/praliases/praliases.c +++ b/usr.sbin/sendmail/praliases/praliases.c @@ -67,7 +67,7 @@ main(argc, argv) #endif filename = "/etc/aliases"; - while ((ch = getopt(argc, argv, "f:")) != EOF) + while ((ch = getopt(argc, argv, "f:")) != -1) switch((char)ch) { case 'f': filename = optarg; diff --git a/usr.sbin/sendmail/src/main.c b/usr.sbin/sendmail/src/main.c index a4805f91f8b..df276d46f1b 100644 --- a/usr.sbin/sendmail/src/main.c +++ b/usr.sbin/sendmail/src/main.c @@ -249,7 +249,7 @@ main(argc, argv, envp) # define OPTIONS "B:b:C:cd:e:F:f:h:IiM:mN:nO:o:p:q:R:r:sTtUV:vX:" #endif opterr = 0; - while ((j = getopt(argc, argv, OPTIONS)) != EOF) + while ((j = getopt(argc, argv, OPTIONS)) != -1) { switch (j) { diff --git a/usr.sbin/sysctl/pathconf.c b/usr.sbin/sysctl/pathconf.c index ad51f0dfa75..e597f4d255d 100644 --- a/usr.sbin/sysctl/pathconf.c +++ b/usr.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/usr.sbin/sysctl/sysctl.c b/usr.sbin/sysctl/sysctl.c index d4957d72837..799c15dd686 100644 --- a/usr.sbin/sysctl/sysctl.c +++ b/usr.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': diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 9d5e7ff1aca..84fec5d551c 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -216,7 +216,7 @@ main(argc, argv) FILE *fp; char *p, line[MSG_BSIZE + 1]; - while ((ch = getopt(argc, argv, "duf:m:p:")) != EOF) + while ((ch = getopt(argc, argv, "duf:m:p:")) != -1) switch(ch) { case 'd': /* debug */ Debug++; diff --git a/usr.sbin/tcpdump/tcpdump.c b/usr.sbin/tcpdump/tcpdump.c index f0737adde0c..06622b6a5fb 100644 --- a/usr.sbin/tcpdump/tcpdump.c +++ b/usr.sbin/tcpdump/tcpdump.c @@ -24,7 +24,7 @@ static const char copyright[] = "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996\n\ The Regents of the University of California. All rights reserved.\n"; static const char rcsid[] = - "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/tcpdump.c,v 1.6 1996/12/12 16:22:21 bitblt Exp $ (LBL)"; + "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/tcpdump.c,v 1.7 1997/01/15 23:44:25 millert Exp $ (LBL)"; #endif /* @@ -145,7 +145,7 @@ main(int argc, char **argv) error("%s", ebuf); opterr = 0; - while ((op = getopt(argc, argv, "c:defF:i:lnNOpqr:s:StT:vw:xY")) != EOF) + while ((op = getopt(argc, argv, "c:defF:i:lnNOpqr:s:StT:vw:xY")) != -1) switch (op) { case 'c': cnt = atoi(optarg); diff --git a/usr.sbin/trpt/trpt.c b/usr.sbin/trpt/trpt.c index 3bab7298bd0..82fa3a92052 100644 --- a/usr.sbin/trpt/trpt.c +++ b/usr.sbin/trpt/trpt.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)trpt.c 5.14 (Berkeley) 7/1/91";*/ -static char rcsid[] = "$Id: trpt.c,v 1.4 1996/12/22 03:29:10 deraadt Exp $"; +static char rcsid[] = "$Id: trpt.c,v 1.5 1997/01/15 23:44:26 millert Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -115,7 +115,7 @@ main(argc, argv) off_t lseek(); jflag = npcbs = 0; - while ((ch = getopt(argc, argv, "afjp:st")) != EOF) + while ((ch = getopt(argc, argv, "afjp:st")) != -1) switch (ch) { case 'a': ++aflag; diff --git a/usr.sbin/videomode/videomode.c b/usr.sbin/videomode/videomode.c index ca4e4c2ed31..91f49caa25a 100644 --- a/usr.sbin/videomode/videomode.c +++ b/usr.sbin/videomode/videomode.c @@ -61,7 +61,7 @@ main(argc, argv) dump_mode(0); return (0); } - while ((c = getopt(argc, argv, "as:")) != EOF) { + while ((c = getopt(argc, argv, "as:")) != -1) { switch (c) { case 'a': if (optind < argc) diff --git a/usr.sbin/vipw/vipw.c b/usr.sbin/vipw/vipw.c index 4b603e8d294..6308bc92299 100644 --- a/usr.sbin/vipw/vipw.c +++ b/usr.sbin/vipw/vipw.c @@ -67,7 +67,7 @@ main(argc, argv) struct stat begin, end; int ch; - while ((ch = getopt(argc, argv, "")) != EOF) { + while ((ch = getopt(argc, argv, "")) != -1) { switch (ch) { case '?': default: diff --git a/usr.sbin/ypserv/makedbm/makedbm.c b/usr.sbin/ypserv/makedbm/makedbm.c index ca8acc57a82..a3f025be54e 100644 --- a/usr.sbin/ypserv/makedbm/makedbm.c +++ b/usr.sbin/ypserv/makedbm/makedbm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: makedbm.c,v 1.4 1996/06/26 21:26:35 maja Exp $ */ +/* $OpenBSD: makedbm.c,v 1.5 1997/01/15 23:44:32 millert Exp $ */ /* * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se> @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: makedbm.c,v 1.4 1996/06/26 21:26:35 maja Exp $"; +static char rcsid[] = "$OpenBSD: makedbm.c,v 1.5 1997/01/15 23:44:32 millert Exp $"; #endif #include <stdio.h> @@ -327,7 +327,7 @@ main (argc,argv) aflag = uflag = bflag = lflag = sflag = 0; infile = outfile = NULL; - while ((ch = getopt(argc, argv, "blsui:o:m:d:")) != EOF) + while ((ch = getopt(argc, argv, "blsui:o:m:d:")) != -1) switch (ch) { case 'b': bflag++; diff --git a/usr.sbin/ypserv/mknetid/mknetid.c b/usr.sbin/ypserv/mknetid/mknetid.c index e905ca6b972..46b859db8bc 100644 --- a/usr.sbin/ypserv/mknetid/mknetid.c +++ b/usr.sbin/ypserv/mknetid/mknetid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mknetid.c,v 1.2 1996/05/30 09:53:09 deraadt Exp $ */ +/* $OpenBSD: mknetid.c,v 1.3 1997/01/15 23:44:33 millert Exp $ */ /* * Copyright (c) 1996 Mats O Jansson <moj@stacken.kth.se> @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: mknetid.c,v 1.2 1996/05/30 09:53:09 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mknetid.c,v 1.3 1997/01/15 23:44:33 millert Exp $"; #endif #include <sys/param.h> @@ -537,7 +537,7 @@ char *argv[]; qflag = usage = 0; domain = NULL; - while ((ch = getopt(argc, argv, "d:g:h:m:p:q")) != EOF) + while ((ch = getopt(argc, argv, "d:g:h:m:p:q")) != -1) switch (ch) { case 'd': domain = optarg; diff --git a/usr.sbin/ypserv/ypserv/ypserv.c b/usr.sbin/ypserv/ypserv/ypserv.c index b9434dacf85..a6d7fc5ba45 100644 --- a/usr.sbin/ypserv/ypserv/ypserv.c +++ b/usr.sbin/ypserv/ypserv/ypserv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypserv.c,v 1.6 1996/10/02 23:44:56 deraadt Exp $ */ +/* $OpenBSD: ypserv.c,v 1.7 1997/01/15 23:44:34 millert Exp $ */ /* * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se> @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ypserv.c,v 1.6 1996/10/02 23:44:56 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ypserv.c,v 1.7 1997/01/15 23:44:34 millert Exp $"; #endif #include "yp.h" @@ -246,7 +246,7 @@ char *argv[]; int ch; extern char *optarg; - while ((ch = getopt(argc, argv, "a:dx")) != EOF) + while ((ch = getopt(argc, argv, "a:dx")) != -1) switch (ch) { case 'a': aclfile = optarg; diff --git a/usr.sbin/ypserv/ypxfr/ypxfr.c b/usr.sbin/ypserv/ypxfr/ypxfr.c index 7bf5665adef..72fb12b07d3 100644 --- a/usr.sbin/ypserv/ypxfr/ypxfr.c +++ b/usr.sbin/ypserv/ypxfr/ypxfr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypxfr.c,v 1.10 1996/12/24 19:28:03 deraadt Exp $ */ +/* $OpenBSD: ypxfr.c,v 1.11 1997/01/15 23:44:35 millert Exp $ */ /* * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se> @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.10 1996/12/24 19:28:03 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: ypxfr.c,v 1.11 1997/01/15 23:44:35 millert Exp $"; #endif #include <stdio.h> @@ -464,7 +464,7 @@ char *argv[]; yp_get_default_domain(&domain); - while ((ch = getopt(argc, argv, "cd:fh:s:C:")) != EOF) + while ((ch = getopt(argc, argv, "cd:fh:s:C:")) != -1) switch (ch) { case 'c': cflag++; |