Use an integer rather than a char for the getopt() return value in order

to make it work with architectures that use unsigned chars.
This commit is contained in:
mark 1997-01-29 01:49:25 +00:00
parent 2ab96deb9a
commit 3d14bc1b12
3 changed files with 10 additions and 7 deletions

View File

@ -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)

View File

@ -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 <netinet/ip_fil.h>
@ -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;

View File

@ -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)