mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 22:05:23 +00:00
Cast arguments for isspace(), isascii(), and other is*() functions to int.
This commit is contained in:
@@ -343,7 +343,7 @@ int parse_ip_addr (cfile, addr)
|
||||
static int
|
||||
is_hex_string(const char *s) {
|
||||
while (*s != '\0') {
|
||||
if (!isxdigit(*s)) {
|
||||
if (!isxdigit((int)*s)) {
|
||||
return 0;
|
||||
}
|
||||
s++;
|
||||
@@ -4837,7 +4837,7 @@ struct option *option;
|
||||
fmt = option->format;
|
||||
|
||||
/* 'a' means always uniform */
|
||||
if ((fmt[0] != '\0') && (tolower(fmt[1]) == 'a'))
|
||||
if ((fmt[0] != '\0') && (tolower((int)fmt[1]) == 'a'))
|
||||
uniform = 1;
|
||||
|
||||
do {
|
||||
|
@@ -45,7 +45,7 @@ char *quotify_string (const char *s, const char *file, int line)
|
||||
for (sp = s; sp && *sp; sp++) {
|
||||
if (*sp == ' ')
|
||||
len++;
|
||||
else if (!isascii (*sp) || !isprint (*sp))
|
||||
else if (!isascii ((int)*sp) || !isprint ((int)*sp))
|
||||
len += 4;
|
||||
else if (*sp == '"' || *sp == '\\')
|
||||
len += 2;
|
||||
@@ -59,7 +59,7 @@ char *quotify_string (const char *s, const char *file, int line)
|
||||
for (sp = s; sp && *sp; sp++) {
|
||||
if (*sp == ' ')
|
||||
*nsp++ = ' ';
|
||||
else if (!isascii (*sp) || !isprint (*sp)) {
|
||||
else if (!isascii ((int)*sp) || !isprint ((int)*sp)) {
|
||||
sprintf (nsp, "\\%03o",
|
||||
*(const unsigned char *)sp);
|
||||
nsp += 4;
|
||||
|
@@ -76,7 +76,7 @@
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
|
||||
static const char rcsid[] = "$Id: res_init.c,v 1.9 2007/09/05 17:32:10 dhankins Exp $";
|
||||
static const char rcsid[] = "$Id: res_init.c,v 1.10 2007/10/01 14:47:35 explorer Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@@ -321,7 +321,7 @@ minires_vinit(res_state statp, int preinit) {
|
||||
break;
|
||||
net = cp;
|
||||
while (*cp && !ISSORTMASK(*cp) && *cp != ';' &&
|
||||
isascii(*cp) && !isspace(*cp))
|
||||
isascii((int)*cp) && !isspace((int)*cp))
|
||||
cp++;
|
||||
n = *cp;
|
||||
*cp = 0;
|
||||
@@ -331,7 +331,7 @@ minires_vinit(res_state statp, int preinit) {
|
||||
*cp++ = n;
|
||||
net = cp;
|
||||
while (*cp && *cp != ';' &&
|
||||
isascii(*cp) && !isspace(*cp))
|
||||
isascii((int)*cp) && !isspace((int)*cp))
|
||||
cp++;
|
||||
n = *cp;
|
||||
*cp = 0;
|
||||
|
Reference in New Issue
Block a user