2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-31 14:25:41 +00:00

Cast arguments for isspace(), isascii(), and other is*() functions to int.

This commit is contained in:
Michael Graff
2007-10-01 14:47:35 +00:00
parent 1418fd1103
commit 5eab8594b6
3 changed files with 7 additions and 7 deletions

View File

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