Add more (unsigned char) casts to ctype macros

This commit is contained in:
Andrey A. Chernov 1997-12-16 08:22:37 +00:00
parent 244bf2805f
commit 8e6f104bf2
2 changed files with 6 additions and 6 deletions

View File

@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$Id$");
__RCSID("$Id: fetch.c,v 1.3 1997/12/13 20:38:16 pst Exp $");
__RCSID_SOURCE("$NetBSD: fetch.c,v 1.16.2.1 1997/11/18 01:00:22 mellon Exp $");
#endif /* not lint */
@ -183,7 +183,7 @@ url_get(origline, proxyenv)
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
if (isdigit(host[0])) {
if (isdigit((unsigned char)host[0])) {
if (inet_aton(host, &sin.sin_addr) == 0) {
warnx("Invalid IP address: %s", host);
goto cleanup_url_get;

View File

@ -1,4 +1,4 @@
/* $Id$ */
/* $Id: ftp.c,v 1.11 1997/12/13 20:38:17 pst Exp $ */
/* $NetBSD: ftp.c,v 1.29.2.1 1997/11/18 01:01:04 mellon Exp $ */
/*
@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
__RCSID("$Id$");
__RCSID("$Id: ftp.c,v 1.11 1997/12/13 20:38:17 pst Exp $");
__RCSID_SOURCE("$NetBSD: ftp.c,v 1.29.2.1 1997/11/18 01:01:04 mellon Exp $");
#endif
#endif /* not lint */
@ -325,11 +325,11 @@ getreply(expecteof)
printf("%s:", hostname);
(void)putchar(c);
}
if (dig < 4 && isdigit(c))
if (dig < 4 && isdigit((unsigned char)c))
code = code * 10 + (c - '0');
if (!pflag && code == 227)
pflag = 1;
if (dig > 4 && pflag == 1 && isdigit(c))
if (dig > 4 && pflag == 1 && isdigit((unsigned char)c))
pflag = 2;
if (pflag == 2) {
if (c != '\r' && c != ')')