aboutsummaryrefslogtreecommitdiff
path: root/validator
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2015-01-02 17:31:36 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2015-01-02 17:31:36 +0000
commitd433784affd32a879670e66bcf330b2561342f3c (patch)
tree7e110cb938b4f1a0c7a7f5bbbfc0a682ab32c4b6 /validator
parentc40c0dcc50043c1f440bca54c9d731eeec13678a (diff)
downloadsrc-d433784affd32a879670e66bcf330b2561342f3c.tar.gz
src-d433784affd32a879670e66bcf330b2561342f3c.zip
import unbound 1.5.0
Notes
Notes: svn path=/vendor/unbound/dist/; revision=276541
Diffstat (limited to 'validator')
-rw-r--r--validator/autotrust.c4
-rw-r--r--validator/val_anchor.c12
-rw-r--r--validator/val_nsec3.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/validator/autotrust.c b/validator/autotrust.c
index a597633828f5..5e1dc4ef3cdb 100644
--- a/validator/autotrust.c
+++ b/validator/autotrust.c
@@ -902,13 +902,13 @@ static int
handle_origin(char* line, uint8_t** origin, size_t* origin_len)
{
size_t len = 0;
- while(isspace((int)*line))
+ while(isspace((unsigned char)*line))
line++;
if(strncmp(line, "$ORIGIN", 7) != 0)
return 0;
free(*origin);
line += 7;
- while(isspace((int)*line))
+ while(isspace((unsigned char)*line))
line++;
*origin = sldns_str2wire_dname(line, &len);
*origin_len = len;
diff --git a/validator/val_anchor.c b/validator/val_anchor.c
index a4adfe2d9dde..3a67fff454ab 100644
--- a/validator/val_anchor.c
+++ b/validator/val_anchor.c
@@ -563,7 +563,7 @@ readkeyword_bindfile(FILE* in, sldns_buffer* buf, int* line, int comments)
/* not a comment, complete the keyword */
if(numdone > 0) {
/* check same type */
- if(isspace(c)) {
+ if(isspace((unsigned char)c)) {
ungetc(c, in);
return numdone;
}
@@ -582,12 +582,12 @@ readkeyword_bindfile(FILE* in, sldns_buffer* buf, int* line, int comments)
}
sldns_buffer_write_u8(buf, (uint8_t)c);
numdone++;
- if(isspace(c)) {
+ if(isspace((unsigned char)c)) {
/* collate whitespace into ' ' */
while((c = getc(in)) != EOF ) {
if(c == '\n')
(*line)++;
- if(!isspace(c)) {
+ if(!isspace((unsigned char)c)) {
ungetc(c, in);
break;
}
@@ -607,7 +607,7 @@ skip_to_special(FILE* in, sldns_buffer* buf, int* line, int spec)
int rdlen;
sldns_buffer_clear(buf);
while((rdlen=readkeyword_bindfile(in, buf, line, 1))) {
- if(rdlen == 1 && isspace((int)*sldns_buffer_begin(buf))) {
+ if(rdlen == 1 && isspace((unsigned char)*sldns_buffer_begin(buf))) {
sldns_buffer_clear(buf);
continue;
}
@@ -648,7 +648,7 @@ process_bind_contents(struct val_anchors* anchors, sldns_buffer* buf,
sldns_buffer_clear(buf);
while((rdlen=readkeyword_bindfile(in, buf, line, comments))) {
if(rdlen == 1 && sldns_buffer_position(buf) == 1
- && isspace((int)*sldns_buffer_begin(buf))) {
+ && isspace((unsigned char)*sldns_buffer_begin(buf))) {
/* starting whitespace is removed */
sldns_buffer_clear(buf);
continue;
@@ -703,7 +703,7 @@ process_bind_contents(struct val_anchors* anchors, sldns_buffer* buf,
}
return 1;
} else if(rdlen == 1 &&
- isspace((int)sldns_buffer_current(buf)[-1])) {
+ isspace((unsigned char)sldns_buffer_current(buf)[-1])) {
/* leave whitespace here */
} else {
/* not space or whatnot, so actual content */
diff --git a/validator/val_nsec3.c b/validator/val_nsec3.c
index fe5091c0a384..548daf2bf0a7 100644
--- a/validator/val_nsec3.c
+++ b/validator/val_nsec3.c
@@ -731,8 +731,8 @@ label_compare_lower(uint8_t* lab1, uint8_t* lab2, size_t lablen)
{
size_t i;
for(i=0; i<lablen; i++) {
- if(tolower((int)*lab1) != tolower((int)*lab2)) {
- if(tolower((int)*lab1) < tolower((int)*lab2))
+ if(tolower((unsigned char)*lab1) != tolower((unsigned char)*lab2)) {
+ if(tolower((unsigned char)*lab1) < tolower((unsigned char)*lab2))
return -1;
return 1;
}