And more casts.

git-svn-id: file:///svn/unbound/trunk@3243 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2014-10-13 08:46:08 +00:00
parent 339a6be27d
commit 722d446905

View file

@ -1153,11 +1153,11 @@ cfg_parse_memsize(const char* str, size_t* res)
else if(len > 1 && str[len-1] == 'B')
len--;
if(len > 1 && tolower(str[len-1]) == 'g')
if(len > 1 && tolower((unsigned char)str[len-1]) == 'g')
mult = 1024*1024*1024;
else if(len > 1 && tolower(str[len-1]) == 'm')
else if(len > 1 && tolower((unsigned char)str[len-1]) == 'm')
mult = 1024*1024;
else if(len > 1 && tolower(str[len-1]) == 'k')
else if(len > 1 && tolower((unsigned char)str[len-1]) == 'k')
mult = 1024;
else if(len > 0 && isdigit((unsigned char)str[len-1]))
mult = 1;
@ -1322,7 +1322,7 @@ cfg_parse_local_zone(struct config_file* cfg, const char* val)
/* parse it as: [zone_name] [between stuff] [zone_type] */
name = val;
while(*name && isspace(*name))
while(*name && isspace((unsigned char)*name))
name++;
if(!*name) {
log_err("syntax error: too short: %s", val);
@ -1341,7 +1341,7 @@ cfg_parse_local_zone(struct config_file* cfg, const char* val)
buf[name_end-name] = '\0';
type = last_space_pos(name_end);
while(type && *type && isspace(*type))
while(type && *type && isspace((unsigned char)*type))
type++;
if(!type || !*type) {
log_err("syntax error: expected zone type: %s", val);
@ -1368,7 +1368,7 @@ char* cfg_ptr_reverse(char* str)
/* parse it as: [IP] [between stuff] [name] */
ip = str;
while(*ip && isspace(*ip))
while(*ip && isspace((unsigned char)*ip))
ip++;
if(!*ip) {
log_err("syntax error: too short: %s", str);
@ -1423,7 +1423,7 @@ char* cfg_ptr_reverse(char* str)
}
/* printed the reverse address, now the between goop and name on end */
while(*ip_end && isspace(*ip_end))
while(*ip_end && isspace((unsigned char)*ip_end))
ip_end++;
if(name>ip_end) {
snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%.*s",