valuedup = strdup(value);
mvaluedup = strdup(mvalue);
for (i = 0; i < strlen(valuedup); i++) {
- valuedup[i] = tolower(valuedup[i]);
+ valuedup[i] = tolower((unsigned char)valuedup[i]);
}
for (i = 0; i < strlen(mvaluedup); i++) {
- mvaluedup[i] = tolower(mvaluedup[i]);
+ mvaluedup[i] = tolower((unsigned char)mvaluedup[i]);
}
result = strstr(valuedup, mvaluedup) != 0;
free(valuedup);
if ( p == NULL )
return 0;
- if ( isdigit ( *p ) ) {
+ if ( isdigit ( (const unsigned char)*p ) ) {
const char *nptr = NULL;
const long id = strtol ( p, (char **) &nptr, 10 );
return id > 0 && nptr != NULL && *nptr == ',' ? id : 0;
proto_str = strdup(token);
lc_proto_str = strdup(token);
for (c = lc_proto_str; *c; c++) {
- *c = tolower(*c);
+ *c = tolower((unsigned char)*c);
}
if (!proto_str || !lc_proto_str) {
free(proto_str);
}
if (!serv && (lc_token = strdup(token))) {
for (c = lc_token; *c; c++) {
- *c = tolower(*c);
+ *c = tolower((unsigned char)*c);
}
serv = getservbyname(lc_token, proto_str);
if (!serv) {