getopt returns -1 not EOF

This commit is contained in:
lukem 1997-10-17 12:52:25 +00:00
parent d0f8d5f560
commit 0a9c07ac82
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rarpd.c,v 1.19 1997/10/17 12:48:17 lukem Exp $ */
/* $NetBSD: rarpd.c,v 1.20 1997/10/17 12:53:14 lukem Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@ -28,7 +28,7 @@ __COPYRIGHT(
#endif /* not lint */
#ifndef lint
__RCSID("$NetBSD: rarpd.c,v 1.19 1997/10/17 12:48:17 lukem Exp $");
__RCSID("$NetBSD: rarpd.c,v 1.20 1997/10/17 12:53:14 lukem Exp $");
#endif
@ -128,7 +128,7 @@ main(argc, argv)
openlog(__progname, LOG_PID, LOG_DAEMON);
opterr = 0;
while ((op = getopt(argc, argv, "adf")) != EOF) {
while ((op = getopt(argc, argv, "adf")) != -1) {
switch (op) {
case 'a':
++aflag;

View File

@ -1,4 +1,4 @@
/* $NetBSD: rbootd.c,v 1.6 1997/07/28 05:39:20 thorpej Exp $ */
/* $NetBSD: rbootd.c,v 1.7 1997/10/17 12:52:25 lukem Exp $ */
/*
* Copyright (c) 1988, 1992 The University of Utah and the Center
@ -57,7 +57,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "@(#)rbootd.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: rbootd.c,v 1.6 1997/07/28 05:39:20 thorpej Exp $");
__RCSID("$NetBSD: rbootd.c,v 1.7 1997/10/17 12:52:25 lukem Exp $");
#endif
#endif /* not lint */
@ -104,7 +104,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++;