const char *ptr = *text;
- while (!isdigit(*ptr)) {
+ while (!isdigit((unsigned char)*ptr)) {
if (strcmp(ptr, "eq") == 0) *opaque = 0;
else if (strcmp(ptr, "gt") == 0) *opaque = 1;
else if (strcmp(ptr, "ge") == 0) *opaque = 2;
if (rport) {
*rport++ = 0;
realport = atol(rport);
- if (!isdigit((int)*rport))
+ if (!isdigit((unsigned char)*rport))
newsrv->state |= SRV_MAPPORTS;
} else {
realport = 0;
end = line + strlen(line);
/* skip leading spaces */
- while (isspace((int)*line))
+ while (isspace((unsigned char)*line))
line++;
arg = 0;
*line = 0;
break;
}
- else if (isspace((int)*line)) {
+ else if (isspace((unsigned char)*line)) {
/* a non-escaped space is an argument separator */
*line++ = 0;
- while (isspace((int)*line))
+ while (isspace((unsigned char)*line))
line++;
args[++arg] = line;
}
while (p1 < cur_end) {
if (*p1 == ';' || *p1 == ',')
colon = p1;
- else if (!isspace((int)*p1))
+ else if (!isspace((unsigned char)*p1))
break;
p1++;
}
break;
p4 = p3;
- while (p4 < cur_end && !isspace((int)*p4) && *p4 != ';' && *p4 != ',')
+ while (p4 < cur_end && !isspace((unsigned char)*p4) && *p4 != ';' && *p4 != ',')
p4++;
/* here, we have the cookie name between p1 and p2,
break;
p4 = p3;
- while (p4 < cur_end && !isspace((int)*p4) && *p4 != ';')
+ while (p4 < cur_end && !isspace((unsigned char)*p4) && *p4 != ';')
p4++;
/* here, we have the cookie name between p1 and p2,
/* p1 is at the beginning of the value */
p2 = p1;
- while (p2 < cur_end && *p2 != '=' && *p2 != ',' && !isspace((int)*p2))
+ while (p2 < cur_end && *p2 != '=' && *p2 != ',' && !isspace((unsigned char)*p2))
p2++;
/* we have a complete value between p1 and p2 */
if (*ptr == '*')
return 0;
- if (isalpha(*ptr)) {
+ if (isalpha((unsigned char)*ptr)) {
/* this is a scheme as described by RFC3986, par. 3.1 */
ptr++;
while (ptr < end &&
- (isalnum(*ptr) || *ptr == '+' || *ptr == '-' || *ptr == '.'))
+ (isalnum((unsigned char)*ptr) || *ptr == '+' || *ptr == '-' || *ptr == '.'))
ptr++;
/* skip '://' */
if (ptr == end || *ptr++ != ':')
while (*str) {
if (*str == '\\') {
str++;
- if (isdigit((int)*str)) {
+ if (isdigit((unsigned char)*str)) {
int len, num;
num = *str - '0';
str++;
if (!*str)
return err;
- else if (isdigit((int)*str))
+ else if (isdigit((unsigned char)*str))
err = NULL;
else if (*str == 'x') {
str++;