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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user