From 3d14bc1b12068435e756cd76dd6e4c193a3fe6a2 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 29 Jan 1997 01:49:25 +0000 Subject: [PATCH] Use an integer rather than a char for the getopt() return value in order to make it work with architectures that use unsigned chars. --- usr.sbin/ipf/ipfstat/fils.c | 5 +++-- usr.sbin/ipf/ipmon/ipmon.c | 7 ++++--- usr.sbin/ipf/ipnat/ipnat.c | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/usr.sbin/ipf/ipfstat/fils.c b/usr.sbin/ipf/ipfstat/fils.c index f06dc41687f1..d0cef59fa8f8 100644 --- a/usr.sbin/ipf/ipfstat/fils.c +++ b/usr.sbin/ipf/ipfstat/fils.c @@ -1,4 +1,4 @@ -/* $NetBSD: fils.c,v 1.3 1997/01/14 06:45:01 cgd Exp $ */ +/* $NetBSD: fils.c,v 1.4 1997/01/29 01:49:25 mark Exp $ */ /* * (C)opyright 1993-1996 by Darren Reed. * @@ -84,7 +84,8 @@ char *argv[]; friostat_t fio; ips_stat_t ipsst; ipfrstat_t ifrst; - char c, *name = NULL, *device = IPL_NAME; + char *name = NULL, *device = IPL_NAME; + int c; int fd; if (openkmem() == -1) diff --git a/usr.sbin/ipf/ipmon/ipmon.c b/usr.sbin/ipf/ipmon/ipmon.c index ac671d96ce12..8a731ef79973 100644 --- a/usr.sbin/ipf/ipmon/ipmon.c +++ b/usr.sbin/ipf/ipmon/ipmon.c @@ -1,4 +1,4 @@ -/* $NetBSD: ipmon.c,v 1.1.1.1 1997/01/05 13:09:04 mrg Exp $ */ +/* $NetBSD: ipmon.c,v 1.2 1997/01/29 01:49:27 mark Exp $ */ /* * (C)opyright 1993-1996 by Darren Reed. @@ -46,7 +46,7 @@ #define IPL_NAME _PATH_IPL #if !defined(lint) && defined(LIBC_SCCS) -static char rcsid[] = "$Id: ipmon.c,v 1.1.1.1 1997/01/05 13:09:04 mrg Exp $"; +static char rcsid[] = "$Id: ipmon.c,v 1.2 1997/01/29 01:49:27 mark Exp $"; #endif #include @@ -494,7 +494,8 @@ char *argv[]; { FILE *log = NULL; int fd = -1, flushed = 0, doread, n; - char buf[512], c, *iplfile = IPL_NAME; + char buf[512], *iplfile = IPL_NAME; + int c; extern int optind; extern char *optarg; diff --git a/usr.sbin/ipf/ipnat/ipnat.c b/usr.sbin/ipf/ipnat/ipnat.c index fa29bd1b0b18..01f88310fbcc 100644 --- a/usr.sbin/ipf/ipnat/ipnat.c +++ b/usr.sbin/ipf/ipnat/ipnat.c @@ -56,7 +56,7 @@ #if !defined(lint) && defined(LIBC_SCCS) static char sccsid[] ="@(#)ipnat.c 1.9 6/5/96 (C) 1993 Darren Reed"; -static char rcsid[] = "$Id: ipnat.c,v 1.2 1997/01/14 06:45:05 cgd Exp $"; +static char rcsid[] = "$Id: ipnat.c,v 1.3 1997/01/29 01:49:28 mark Exp $"; #endif #if SOLARIS @@ -81,7 +81,8 @@ int main(argc, argv) int argc; char *argv[]; { - char *file = NULL, c; + char *file = NULL; + int c; int fd, opts = 1; while ((c = getopt(argc, argv, "f:lnrsv")) != -1)