1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-27 16:39:08 +00:00

compare return value from getopt against -1 rather than EOF, per the final

posix standard on the topic.
This commit is contained in:
Warner Losh 1997-03-29 03:33:12 +00:00
parent f37dd3ba03
commit 8d64695c7c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24359
49 changed files with 74 additions and 74 deletions

View File

@ -82,7 +82,7 @@ int main(argc, argv)
init = Unknown;
sigset_t mask, emask;
while ((ch = getopt(argc, argv, "ais")) != EOF)
while ((ch = getopt(argc, argv, "ais")) != -1)
switch((char)ch) {
case 'i': /* initial call, save offset */
if (init != Unknown)

View File

@ -160,7 +160,7 @@ main(argc, argv)
int ch, f, flag, error = 0;
char *name = 0;
while ((ch = getopt(argc, argv, OPTIONS)) != EOF)
while ((ch = getopt(argc, argv, OPTIONS)) != -1)
switch (ch) {
#if NUMBOOT > 0
case 'B':

View File

@ -160,7 +160,7 @@ main(argc, argv)
int ch, f, flag, error = 0;
char *name = 0;
while ((ch = getopt(argc, argv, OPTIONS)) != EOF)
while ((ch = getopt(argc, argv, OPTIONS)) != -1)
switch (ch) {
#if NUMBOOT > 0
case 'B':

View File

@ -42,7 +42,7 @@ static const char copyright[] =
static const char sccsid[] = "@(#)dmesg.c 8.1 (Berkeley) 6/5/93";
#endif
static const char rcsid[] =
"$Id$";
"$Id: dmesg.c,v 1.6 1997/02/22 14:32:13 peter Exp $";
#endif /* not lint */
#include <sys/cdefs.h>
@ -85,7 +85,7 @@ main(argc, argv)
(void) setlocale(LC_CTYPE, "");
memf = nlistf = NULL;
while ((ch = getopt(argc, argv, "M:N:")) != EOF)
while ((ch = getopt(argc, argv, "M:N:")) != -1)
switch(ch) {
case 'M':
memf = optarg;

View File

@ -114,7 +114,7 @@ main(ac, av)
int testonly = FALSE;
int verbose = FALSE;
while ((ch = getopt(ac, av, "qtv")) != EOF)
while ((ch = getopt(ac, av, "qtv")) != -1)
switch (ch) {
case 'q':
quiet = TRUE;

View File

@ -40,7 +40,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "From: @(#)swapon.c 8.1 (Berkeley) 6/5/93";*/
static const char rcsid[] =
"$Id$";
"$Id: dumpon.c,v 1.4 1997/02/22 14:32:22 peter Exp $";
#endif /* not lint */
#include <errno.h>
@ -68,7 +68,7 @@ main(int argc, char **argv)
verbose = rv = 0;
whoami = argv[0];
while ((ch = getopt(argc, argv, "v")) != EOF)
while ((ch = getopt(argc, argv, "v")) != -1)
switch((char)ch) {
case 'v':
verbose = 1;

View File

@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
"$Id: mount_msdos.c,v 1.7 1997/02/22 14:32:30 peter Exp $";
"$Id: mount_msdos.c,v 1.8 1997/03/03 13:23:54 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -75,7 +75,7 @@ main(argc, argv)
mntflags = set_gid = set_uid = set_mask = 0;
(void)memset(&args, '\0', sizeof(args));
while ((c = getopt(argc, argv, "u:g:m:o:")) != EOF) {
while ((c = getopt(argc, argv, "u:g:m:o:")) != -1) {
switch (c) {
case 'u':
args.uid = a_uid(optarg);

View File

@ -66,7 +66,7 @@ main (int argc, char** argv)
int part;
bflag = 0;
while ((ch = getopt(argc, argv, "bde")) != EOF) {
while ((ch = getopt(argc, argv, "bde")) != -1) {
switch(ch) {
case 'b':
bflag = 1;

View File

@ -16,7 +16,7 @@
*
* NEW command line interface for IP firewall facility
*
* $Id: ipfw.c,v 1.40 1997/02/22 14:32:36 peter Exp $
* $Id: ipfw.c,v 1.41 1997/03/05 12:08:44 bde Exp $
*
*/
@ -856,7 +856,7 @@ ipfw_main(ac,av)
/* Set the force flag for non-interactive processes */
do_force = !isatty(STDIN_FILENO);
while ((ch = getopt(ac, av ,"afqtN")) != EOF)
while ((ch = getopt(ac, av ,"afqtN")) != -1)
switch(ch) {
case 'a':
do_acct=1;

View File

@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: modload.c,v 1.16 1997/02/22 14:32:40 peter Exp $
* $Id: modload.c,v 1.17 1997/03/11 12:23:09 peter Exp $
*/
#include <stdio.h>
@ -172,7 +172,7 @@ main(argc, argv)
int sz, bytesleft;
char buf[MODIOBUF];
while ((c = getopt(argc, argv, "dvquA:e:p:o:")) != EOF) {
while ((c = getopt(argc, argv, "dvquA:e:p:o:")) != -1) {
switch (c) {
case 'd':
debug = 1;

View File

@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: modunload.c,v 1.4 1997/02/22 14:32:42 peter Exp $
* $Id: modunload.c,v 1.5 1997/03/11 12:24:00 peter Exp $
*/
#include <stdio.h>
@ -74,7 +74,7 @@ main(argc, argv)
char *modname = NULL;
struct lmc_unload ulbuf;
while ((c = getopt(argc, argv, "i:n:")) != EOF) {
while ((c = getopt(argc, argv, "i:n:")) != -1) {
switch (c) {
case 'i':
modnum = atoi(optarg);

View File

@ -81,7 +81,7 @@ mount_ufs(argc, argv)
mntflags = 0;
optind = optreset = 1; /* Reset for parse of new argv. */
while ((ch = getopt(argc, argv, "o:")) != EOF)
while ((ch = getopt(argc, argv, "o:")) != -1)
switch (ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);

View File

@ -49,7 +49,7 @@ static char copyright[] =
static char sccsid[] = "@(#)mount_cd9660.c 8.7 (Berkeley) 5/1/95";
*/
static const char rcsid[] =
"$Id: mount_cd9660.c,v 1.9 1997/02/22 14:32:44 peter Exp $";
"$Id: mount_cd9660.c,v 1.10 1997/03/11 12:29:02 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -88,7 +88,7 @@ main(argc, argv)
int error;
mntflags = opts = 0;
while ((ch = getopt(argc, argv, "ego:r")) != EOF)
while ((ch = getopt(argc, argv, "ego:r")) != -1)
switch (ch) {
case 'e':
opts |= ISOFSMNT_EXTATT;

View File

@ -42,7 +42,7 @@ static char copyright[] =
static char sccsid[] = "@(#)mount_lfs.c 8.3 (Berkeley) 3/27/94";
*/
static const char rcsid[] =
"$Id: mount_ext2fs.c,v 1.6 1997/02/22 14:32:45 peter Exp $";
"$Id: mount_ext2fs.c,v 1.7 1997/03/11 12:29:51 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -80,7 +80,7 @@ main(argc, argv)
options = NULL;
mntflags = 0;
while ((ch = getopt(argc, argv, "o:")) != EOF)
while ((ch = getopt(argc, argv, "o:")) != -1)
switch (ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);

View File

@ -81,7 +81,7 @@ mount_ufs(argc, argv)
mntflags = 0;
optind = optreset = 1; /* Reset for parse of new argv. */
while ((ch = getopt(argc, argv, "o:")) != EOF)
while ((ch = getopt(argc, argv, "o:")) != -1)
switch (ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);

View File

@ -42,7 +42,7 @@ static char copyright[] =
static char sccsid[] = "@(#)mount_lfs.c 8.4 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
"$Id: mount_lfs.c,v 1.7 1997/02/22 14:32:46 peter Exp $";
"$Id: mount_lfs.c,v 1.8 1997/03/11 12:30:33 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -83,7 +83,7 @@ main(argc, argv)
options = NULL;
mntflags = noclean = short_rds = cleaner_debug = 0;
while ((ch = getopt(argc, argv, "dno:s")) != EOF)
while ((ch = getopt(argc, argv, "dno:s")) != -1)
switch (ch) {
case 'd':
cleaner_debug = 1;

View File

@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
"$Id: mount_msdos.c,v 1.7 1997/02/22 14:32:30 peter Exp $";
"$Id: mount_msdos.c,v 1.8 1997/03/03 13:23:54 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -75,7 +75,7 @@ main(argc, argv)
mntflags = set_gid = set_uid = set_mask = 0;
(void)memset(&args, '\0', sizeof(args));
while ((c = getopt(argc, argv, "u:g:m:o:")) != EOF) {
while ((c = getopt(argc, argv, "u:g:m:o:")) != -1) {
switch (c) {
case 'u':
args.uid = a_uid(optarg);

View File

@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
"$Id: mount_msdos.c,v 1.7 1997/02/22 14:32:30 peter Exp $";
"$Id: mount_msdos.c,v 1.8 1997/03/03 13:23:54 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -75,7 +75,7 @@ main(argc, argv)
mntflags = set_gid = set_uid = set_mask = 0;
(void)memset(&args, '\0', sizeof(args));
while ((c = getopt(argc, argv, "u:g:m:o:")) != EOF) {
while ((c = getopt(argc, argv, "u:g:m:o:")) != -1) {
switch (c) {
case 'u':
args.uid = a_uid(optarg);

View File

@ -45,7 +45,7 @@ static char copyright[] =
static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95";
*/
static const char rcsid[] =
"$Id: mount_nfs.c,v 1.16 1997/02/22 14:32:48 peter Exp $";
"$Id: mount_nfs.c,v 1.17 1997/03/11 12:31:56 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -223,7 +223,7 @@ main(argc, argv)
nfsargs = nfsdefargs;
nfsargsp = &nfsargs;
while ((c = getopt(argc, argv,
"3a:bcdD:g:I:iKL:lm:o:PpqR:r:sTt:w:x:U")) != EOF)
"3a:bcdD:g:I:iKL:lm:o:PpqR:r:sTt:w:x:U")) != -1)
switch (c) {
case '3':
nfsargsp->flags |= NFSMNT_NFSV3;

View File

@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_null.c 8.6 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
"$Id: mount_null.c,v 1.7 1997/02/22 14:32:51 peter Exp $";
"$Id: mount_null.c,v 1.8 1997/03/11 12:33:36 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -81,7 +81,7 @@ main(argc, argv)
int error;
mntflags = 0;
while ((ch = getopt(argc, argv, "o:")) != EOF)
while ((ch = getopt(argc, argv, "o:")) != -1)
switch(ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);

View File

@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_null.c 8.6 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
"$Id: mount_null.c,v 1.7 1997/02/22 14:32:51 peter Exp $";
"$Id: mount_null.c,v 1.8 1997/03/11 12:33:36 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -81,7 +81,7 @@ main(argc, argv)
int error;
mntflags = 0;
while ((ch = getopt(argc, argv, "o:")) != EOF)
while ((ch = getopt(argc, argv, "o:")) != -1)
switch(ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);

View File

@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
"$Id: mount_portal.c,v 1.10 1997/03/11 12:34:58 peter Exp $";
"$Id: mount_portal.c,v 1.11 1997/03/24 05:53:12 imp Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -122,7 +122,7 @@ main(argc, argv)
*/
int ch;
while ((ch = getopt(argc, argv, "o:")) != EOF) {
while ((ch = getopt(argc, argv, "o:")) != -1) {
switch (ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);

View File

@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
"$Id: mount_portal.c,v 1.10 1997/03/11 12:34:58 peter Exp $";
"$Id: mount_portal.c,v 1.11 1997/03/24 05:53:12 imp Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -122,7 +122,7 @@ main(argc, argv)
*/
int ch;
while ((ch = getopt(argc, argv, "o:")) != EOF) {
while ((ch = getopt(argc, argv, "o:")) != -1) {
switch (ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);

View File

@ -43,7 +43,7 @@ char copyright[] =
#ifndef lint
static const char rcsid[] =
"$Id: mount_std.c,v 1.5 1997/02/22 14:32:59 peter Exp $";
"$Id: mount_std.c,v 1.6 1997/03/11 12:38:16 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -92,7 +92,7 @@ main(argc, argv)
}
mntflags = 0;
while ((ch = getopt(argc, argv, "o:")) != EOF)
while ((ch = getopt(argc, argv, "o:")) != -1)
switch (ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);

View File

@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_umap.c 8.5 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
"$Id: mount_umap.c,v 1.9 1997/02/22 14:33:00 peter Exp $";
"$Id: mount_umap.c,v 1.10 1997/03/11 12:39:32 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -105,7 +105,7 @@ main(argc, argv)
mntflags = 0;
mapfile = gmapfile = NULL;
while ((ch = getopt(argc, argv, "g:o:u:")) != EOF)
while ((ch = getopt(argc, argv, "g:o:u:")) != -1)
switch (ch) {
case 'g':
gmapfile = optarg;

View File

@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_umap.c 8.5 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
"$Id: mount_umap.c,v 1.9 1997/02/22 14:33:00 peter Exp $";
"$Id: mount_umap.c,v 1.10 1997/03/11 12:39:32 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -105,7 +105,7 @@ main(argc, argv)
mntflags = 0;
mapfile = gmapfile = NULL;
while ((ch = getopt(argc, argv, "g:o:u:")) != EOF)
while ((ch = getopt(argc, argv, "g:o:u:")) != -1)
switch (ch) {
case 'g':
gmapfile = optarg;

View File

@ -79,7 +79,7 @@ main(argc, argv)
mntflags = 0;
args.mntflags = UNMNT_ABOVE;
while ((ch = getopt(argc, argv, "bo:r")) != EOF)
while ((ch = getopt(argc, argv, "bo:r")) != -1)
switch (ch) {
case 'b':
args.mntflags &= ~UNMNT_OPMASK;

View File

@ -79,7 +79,7 @@ main(argc, argv)
mntflags = 0;
args.mntflags = UNMNT_ABOVE;
while ((ch = getopt(argc, argv, "bo:r")) != EOF)
while ((ch = getopt(argc, argv, "bo:r")) != -1)
switch (ch) {
case 'b':
args.mntflags &= ~UNMNT_OPMASK;

View File

@ -43,7 +43,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; */
static const char rcsid[] =
"$Id: mountd.c,v 1.14 1997/03/11 12:43:45 peter Exp $";
"$Id: mountd.c,v 1.15 1997/03/27 20:00:48 guido Exp $";
#endif /*not lint*/
#include <sys/param.h>
@ -270,7 +270,7 @@ main(argc, argv)
errx(1, "NFS support is not available in the running kernel");
#endif /* __FreeBSD__ */
while ((c = getopt(argc, argv, "dnr")) != EOF)
while ((c = getopt(argc, argv, "dnr")) != -1)
switch (c) {
case 'n':
resvport_only = 0;

View File

@ -235,7 +235,7 @@ main(argc, argv)
opstring = mfs ?
"NF:T:a:b:c:d:e:f:i:m:o:s:" :
"NOS:T:a:b:c:d:e:f:i:k:l:m:n:o:p:r:s:t:u:x:";
while ((ch = getopt(argc, argv, opstring)) != EOF)
while ((ch = getopt(argc, argv, opstring)) != -1)
switch (ch) {
case 'N':
Nflag = 1;

View File

@ -143,7 +143,7 @@ main(argc, argv)
opstring += 2;
debug = lfs = segsize = 0;
while ((ch = getopt(argc, argv, opstring)) != EOF)
while ((ch = getopt(argc, argv, opstring)) != -1)
switch(ch) {
case 'B': /* LFS segment size */
if ((segsize = atoi(optarg)) < LFS_MINSEGSIZE)

View File

@ -66,7 +66,7 @@ main (int argc, char** argv)
int part;
bflag = 0;
while ((ch = getopt(argc, argv, "bde")) != EOF) {
while ((ch = getopt(argc, argv, "bde")) != -1) {
switch(ch) {
case 'b':
bflag = 1;

View File

@ -194,7 +194,7 @@ main(argc, argv, envp)
#define GETOPT "n:rtu"
#define USAGE "[-rtu] [-n num_servers]"
#endif
while ((ch = getopt(argc, argv, GETOPT)) != EOF)
while ((ch = getopt(argc, argv, GETOPT)) != -1)
switch (ch) {
case 'n':
nfsdcnt = atoi(optarg);

View File

@ -102,7 +102,7 @@ main(argc, argv)
#define MAXNFSDCNT 20
#define DEFNFSDCNT 1
num_servers = DEFNFSDCNT;
while ((ch = getopt(argc, argv, "n:")) != EOF)
while ((ch = getopt(argc, argv, "n:")) != -1)
switch (ch) {
case 'n':
num_servers = atoi(optarg);

View File

@ -136,7 +136,7 @@ main(argc, argv)
char ch, *name;
errs = maxrun = 0;
while ((ch = getopt(argc, argv, "aguvl:")) != EOF) {
while ((ch = getopt(argc, argv, "aguvl:")) != -1) {
switch(ch) {
case 'a':
aflag++;

View File

@ -72,7 +72,7 @@ main(argc, argv)
} else
howto = 0;
lflag = nflag = qflag = 0;
while ((ch = getopt(argc, argv, "lnpq")) != EOF)
while ((ch = getopt(argc, argv, "lnpq")) != -1)
switch(ch) {
case 'l': /* Undocumented; used by shutdown. */
lflag = 1;

View File

@ -96,7 +96,7 @@ main(argc, argv)
if ((inputdev = getenv("TAPE")) == NULL)
inputdev = _PATH_DEFTAPE;
obsolete(&argc, &argv);
while ((ch = getopt(argc, argv, "b:cdf:himNRrs:tvxy")) != EOF)
while ((ch = getopt(argc, argv, "b:cdf:himNRrs:tvxy")) != -1)
switch(ch) {
case 'b':
/* Change default tape blocksize. */

View File

@ -123,7 +123,7 @@ main(int argc,
(void)gethostname(myname, sizeof(myname)-1);
(void)gethost(myname, &myaddr);
while ((n = getopt(argc, argv, "sqdghmpAtT:F:P:")) != EOF) {
while ((n = getopt(argc, argv, "sqdghmpAtT:F:P:")) != -1) {
switch (n) {
case 's':
supplier = 1;

View File

@ -118,7 +118,7 @@ main(int argc,
OMSG.rip_nets[0].n_metric = htonl(HOPCNT_INFINITY);
pgmname = argv[0];
while ((ch = getopt(argc, argv, "np1w:r:t:a:")) != EOF)
while ((ch = getopt(argc, argv, "np1w:r:t:a:")) != -1)
switch (ch) {
case 'n':
not_trace = 1;

View File

@ -139,7 +139,7 @@ main(argc, argv)
openlog("savecore", LOG_PERROR, LOG_DAEMON);
while ((ch = getopt(argc, argv, "cdfN:vz")) != EOF)
while ((ch = getopt(argc, argv, "cdfN:vz")) != -1)
switch(ch) {
case 'c':
clear = 1;

View File

@ -39,7 +39,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: scsi.c,v 1.14 1997/02/22 14:33:16 peter Exp $
*/
#include <stdio.h>
@ -108,7 +108,7 @@ void procargs(int *argc_p, char ***argv_p)
fflag = 0;
commandflag = 0;
debugflag = 0;
while ((ch = getopt(argc, argv, "ceprvf:d:b:t:l:z:m:P:s:")) != EOF) {
while ((ch = getopt(argc, argv, "ceprvf:d:b:t:l:z:m:P:s:")) != -1) {
switch (ch) {
case 'p':
probe_all = 1;

View File

@ -111,7 +111,7 @@ main(argc, argv)
#endif
nosync = NULL;
readstdin = 0;
while ((ch = getopt(argc, argv, "-hknr")) != EOF)
while ((ch = getopt(argc, argv, "-hknr")) != -1)
switch (ch) {
case '-':
readstdin = 1;

View File

@ -42,7 +42,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)slattach.c 4.6 (Berkeley) 6/1/90";*/
static char rcsid[] = "$Id$";
static char rcsid[] = "$Id: slattach.c,v 1.25 1997/02/22 14:33:19 peter Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -132,7 +132,7 @@ int main(int argc, char **argv)
extern char *optarg;
extern int optind;
while ((option = getopt(argc, argv, "ace:fhlnr:s:u:zLK:O:S:")) != EOF) {
while ((option = getopt(argc, argv, "ace:fhlnr:s:u:zLK:O:S:")) != -1) {
switch (option) {
case 'a':
slflags |= IFF_LINK2;

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: startslip.c,v 1.22 1997/02/22 14:33:20 peter Exp $
*/
#ifndef lint
@ -128,7 +128,7 @@ main(argc, argv)
pid_t pid;
struct termios t;
while ((ch = getopt(argc, argv, "dhlb:s:t:w:A:U:D:W:K:O:S:L")) != EOF)
while ((ch = getopt(argc, argv, "dhlb:s:t:w:A:U:D:W:K:O:S:L")) != -1)
switch (ch) {
case 'd':
debug = 1;

View File

@ -60,7 +60,7 @@ main(int argc, char **argv)
int ch, doall;
doall = 0;
while ((ch = getopt(argc, argv, "a")) != EOF)
while ((ch = getopt(argc, argv, "a")) != -1)
switch((char)ch) {
case 'a':
doall = 1;

View File

@ -87,7 +87,7 @@ main(argc, argv)
sync();
all = 0;
while ((ch = getopt(argc, argv, "aFfh:t:v")) != EOF)
while ((ch = getopt(argc, argv, "aFfh:t:v")) != -1)
switch (ch) {
case 'a':
all = 1;

View File

@ -45,7 +45,7 @@ char copyright[] =
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
*/
static const char rcsid[] =
"$Id: mount_portal.c,v 1.10 1997/03/11 12:34:58 peter Exp $";
"$Id: mount_portal.c,v 1.11 1997/03/24 05:53:12 imp Exp $";
#endif /* not lint */
#include <sys/param.h>
@ -122,7 +122,7 @@ main(argc, argv)
*/
int ch;
while ((ch = getopt(argc, argv, "o:")) != EOF) {
while ((ch = getopt(argc, argv, "o:")) != -1) {
switch (ch) {
case 'o':
getmntopts(optarg, mopts, &mntflags, 0);

View File

@ -43,7 +43,7 @@ static char copyright[] =
#ifndef lint
/*static char sccsid[] = "@(#)mountd.c 8.15 (Berkeley) 5/1/95"; */
static const char rcsid[] =
"$Id: mountd.c,v 1.14 1997/03/11 12:43:45 peter Exp $";
"$Id: mountd.c,v 1.15 1997/03/27 20:00:48 guido Exp $";
#endif /*not lint*/
#include <sys/param.h>
@ -270,7 +270,7 @@ main(argc, argv)
errx(1, "NFS support is not available in the running kernel");
#endif /* __FreeBSD__ */
while ((c = getopt(argc, argv, "dnr")) != EOF)
while ((c = getopt(argc, argv, "dnr")) != -1)
switch (c) {
case 'n':
resvport_only = 0;

View File

@ -194,7 +194,7 @@ main(argc, argv, envp)
#define GETOPT "n:rtu"
#define USAGE "[-rtu] [-n num_servers]"
#endif
while ((ch = getopt(argc, argv, GETOPT)) != EOF)
while ((ch = getopt(argc, argv, GETOPT)) != -1)
switch (ch) {
case 'n':
nfsdcnt = atoi(optarg);