mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 06:45:27 +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
|
static int
|
||||||
is_hex_string(const char *s) {
|
is_hex_string(const char *s) {
|
||||||
while (*s != '\0') {
|
while (*s != '\0') {
|
||||||
if (!isxdigit(*s)) {
|
if (!isxdigit((int)*s)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
s++;
|
s++;
|
||||||
@@ -4837,7 +4837,7 @@ struct option *option;
|
|||||||
fmt = option->format;
|
fmt = option->format;
|
||||||
|
|
||||||
/* 'a' means always uniform */
|
/* 'a' means always uniform */
|
||||||
if ((fmt[0] != '\0') && (tolower(fmt[1]) == 'a'))
|
if ((fmt[0] != '\0') && (tolower((int)fmt[1]) == 'a'))
|
||||||
uniform = 1;
|
uniform = 1;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@@ -45,7 +45,7 @@ char *quotify_string (const char *s, const char *file, int line)
|
|||||||
for (sp = s; sp && *sp; sp++) {
|
for (sp = s; sp && *sp; sp++) {
|
||||||
if (*sp == ' ')
|
if (*sp == ' ')
|
||||||
len++;
|
len++;
|
||||||
else if (!isascii (*sp) || !isprint (*sp))
|
else if (!isascii ((int)*sp) || !isprint ((int)*sp))
|
||||||
len += 4;
|
len += 4;
|
||||||
else if (*sp == '"' || *sp == '\\')
|
else if (*sp == '"' || *sp == '\\')
|
||||||
len += 2;
|
len += 2;
|
||||||
@@ -59,7 +59,7 @@ char *quotify_string (const char *s, const char *file, int line)
|
|||||||
for (sp = s; sp && *sp; sp++) {
|
for (sp = s; sp && *sp; sp++) {
|
||||||
if (*sp == ' ')
|
if (*sp == ' ')
|
||||||
*nsp++ = ' ';
|
*nsp++ = ' ';
|
||||||
else if (!isascii (*sp) || !isprint (*sp)) {
|
else if (!isascii ((int)*sp) || !isprint ((int)*sp)) {
|
||||||
sprintf (nsp, "\\%03o",
|
sprintf (nsp, "\\%03o",
|
||||||
*(const unsigned char *)sp);
|
*(const unsigned char *)sp);
|
||||||
nsp += 4;
|
nsp += 4;
|
||||||
|
@@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
#if defined(LIBC_SCCS) && !defined(lint)
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
|
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 */
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@@ -321,7 +321,7 @@ minires_vinit(res_state statp, int preinit) {
|
|||||||
break;
|
break;
|
||||||
net = cp;
|
net = cp;
|
||||||
while (*cp && !ISSORTMASK(*cp) && *cp != ';' &&
|
while (*cp && !ISSORTMASK(*cp) && *cp != ';' &&
|
||||||
isascii(*cp) && !isspace(*cp))
|
isascii((int)*cp) && !isspace((int)*cp))
|
||||||
cp++;
|
cp++;
|
||||||
n = *cp;
|
n = *cp;
|
||||||
*cp = 0;
|
*cp = 0;
|
||||||
@@ -331,7 +331,7 @@ minires_vinit(res_state statp, int preinit) {
|
|||||||
*cp++ = n;
|
*cp++ = n;
|
||||||
net = cp;
|
net = cp;
|
||||||
while (*cp && *cp != ';' &&
|
while (*cp && *cp != ';' &&
|
||||||
isascii(*cp) && !isspace(*cp))
|
isascii((int)*cp) && !isspace((int)*cp))
|
||||||
cp++;
|
cp++;
|
||||||
n = *cp;
|
n = *cp;
|
||||||
*cp = 0;
|
*cp = 0;
|
||||||
|
Reference in New Issue
Block a user