Compare a return value of getopt() against -1 instead of EOF.
This commit is contained in:
parent
ec75ec1f8c
commit
42eb13e478
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fingerd.c,v 1.6 1997/09/09 05:38:26 mrg Exp $ */
|
||||
/* $NetBSD: fingerd.c,v 1.7 1997/10/08 00:56:46 enami Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -43,7 +43,7 @@ static char const copyright[] =
|
|||
#if 0
|
||||
static char sccsid[] = "from: @(#)fingerd.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
static char const rcsid[] = "$NetBSD: fingerd.c,v 1.6 1997/09/09 05:38:26 mrg Exp $";
|
||||
static char const rcsid[] = "$NetBSD: fingerd.c,v 1.7 1997/10/08 00:56:46 enami Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -82,7 +82,7 @@ main(argc, argv)
|
|||
logging = no_forward = user_required = short_list = 0;
|
||||
openlog("fingerd", LOG_PID | LOG_CONS, LOG_DAEMON);
|
||||
opterr = 0;
|
||||
while ((ch = getopt(argc, argv, "gsluSmpP:")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "gsluSmpP:")) != -1)
|
||||
switch (ch) {
|
||||
case 'l':
|
||||
logging = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: getNAME.c,v 1.4 1997/10/07 10:59:23 mrg Exp $ */
|
||||
/* $NetBSD: getNAME.c,v 1.5 1997/10/08 00:58:07 enami Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)getNAME.c 8.1 (Berkeley) 6/30/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: getNAME.c,v 1.4 1997/10/07 10:59:23 mrg Exp $");
|
||||
__RCSID("$NetBSD: getNAME.c,v 1.5 1997/10/08 00:58:07 enami Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -74,7 +74,7 @@ main(argc, argv)
|
|||
extern int optind;
|
||||
int ch;
|
||||
|
||||
while ((ch = getopt(argc, argv, "itw")) != EOF)
|
||||
while ((ch = getopt(argc, argv, "itw")) != -1)
|
||||
switch(ch) {
|
||||
case 'i':
|
||||
intro = 1;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cleanerd.c,v 1.2 1997/10/07 13:39:58 mrg Exp $ */
|
||||
/* $NetBSD: cleanerd.c,v 1.3 1997/10/08 00:59:18 enami Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\
|
|||
#if 0
|
||||
static char sccsid[] = "from: @(#)cleanerd.c 8.2 (Berkeley) 1/13/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: cleanerd.c,v 1.2 1997/10/07 13:39:58 mrg Exp $");
|
||||
__RCSID("$NetBSD: cleanerd.c,v 1.3 1997/10/08 00:59:18 enami Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -162,7 +162,7 @@ main(argc, argv)
|
|||
extern int optind;
|
||||
|
||||
cmd_err = nodaemon = 0;
|
||||
while ((opt = getopt(argc, argv, "smd")) != EOF) {
|
||||
while ((opt = getopt(argc, argv, "smd")) != -1) {
|
||||
switch (opt) {
|
||||
case 's': /* small writes */
|
||||
do_small = 1;
|
||||
|
|
Loading…
Reference in New Issue