ntp_getopt returns -1 not EOF, disable WARNS here

This commit is contained in:
lukem 1997-10-17 14:34:38 +00:00
parent a67f5d3e96
commit bb2c8b04e6
8 changed files with 19 additions and 10 deletions

View File

@ -1,5 +1,10 @@
# $NetBSD: Makefile.inc,v 1.4 1997/06/23 17:34:18 christos Exp $
# $NetBSD: Makefile.inc,v 1.5 1997/10/17 14:34:38 lukem Exp $
WARNS?= 0
CFLAGS += -I${.CURDIR}/../include -DHAVE_CONFIG_H
LDADD += -lntp
DPADD += ${LIBNTP}
BINDIR = /usr/sbin
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
.endif

View File

@ -238,7 +238,7 @@ main(argc, argv)
/*
* Decode argument list
*/
while ((c = ntp_getopt(argc, argv, "a:bBde:k:o:p:qr:st:uv")) != EOF)
while ((c = ntp_getopt(argc, argv, "a:bBde:k:o:p:qr:st:uv")) != -1)
switch (c)
{
case 'a':

View File

@ -447,7 +447,7 @@ char *argv[];
delay_time.l_uf = DEFDELAY;
progname = argv[0];
while ((c = ntp_getopt(argc, argv, "c:dinp")) != EOF)
while ((c = ntp_getopt(argc, argv, "c:dinp")) != -1)
switch (c) {
case 'c':
ADDCMD(ntp_optarg);

View File

@ -103,7 +103,7 @@ main(argc, argv)
memset((char *)&ntx, 0, sizeof(ntx));
progname = argv[0];
while ((c = ntp_getopt(argc, argv, optargs)) != EOF) switch (c) {
while ((c = ntp_getopt(argc, argv, optargs)) != -1) switch (c) {
case 'c':
cost++;
break;

View File

@ -127,7 +127,7 @@ main(argc, argv)
/*
* Decode argument list
*/
while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != EOF)
while ((c = ntp_getopt(argc, argv, "do:nr:t:v")) != -1)
switch (c) {
case 'd':
++debug;

View File

@ -1,6 +1,6 @@
#!/usr/local/bin/perl
#
# $NetBSD: xntp2netbsd,v 1.9 1997/07/08 05:07:47 christos Exp $
# $NetBSD: xntp2netbsd,v 1.10 1997/10/17 14:34:44 lukem Exp $
#
# Perl script to convert a standard distribution directory for xntp into
# a NetBSD source tree.
@ -263,10 +263,14 @@ SUBDIR= ntpdate ntpq ntptime ntptrace xntpd xntpdc
.include <bsd.subdir.mk>
%% file usr.sbin/xntp/Makefile.inc
%% NetBSD #
WARNS?= 0
CFLAGS += -I${.CURDIR}/../include -DHAVE_CONFIG_H
LDADD += -lntp
DPADD += ${LIBNTP}
BINDIR = /usr/sbin
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
.endif
%% file usr.sbin/xntp/xntpd/Makefile
%% NetBSD #

View File

@ -484,7 +484,7 @@ getstartup(argc, argv)
/*
* Decode argument list
*/
while ((c = ntp_getopt(argc, argv, xntp_options)) != EOF)
while ((c = ntp_getopt(argc, argv, xntp_options)) != -1)
switch (c) {
#ifdef DEBUG
case 'd':

View File

@ -248,7 +248,7 @@ char *argv[];
delay_time.l_uf = DEFDELAY;
progname = argv[0];
while ((c = ntp_getopt(argc, argv, "c:dilnps")) != EOF)
while ((c = ntp_getopt(argc, argv, "c:dilnps")) != -1)
switch (c) {
case 'c':
ADDCMD(ntp_optarg);