summaryrefslogtreecommitdiff
path: root/rr.c
diff options
context:
space:
mode:
authorWillem Toorop <willem@nlnetlabs.nl>2016-11-30 15:37:35 +0100
committerWillem Toorop <willem@nlnetlabs.nl>2016-11-30 15:37:35 +0100
commit1704cb96a22f754504e5cac8b404ee139d8c544b (patch)
treef509ff4ca38e13bfc17e2de2ca4f65ff3ad47202 /rr.c
parent7762ec6dbed0ba2f030e802450c1825c2bda29cd (diff)
downloadldns-1704cb96a22f754504e5cac8b404ee139d8c544b.tar.gz
Handle "array subscript has type 'char'" warnings
Diffstat (limited to 'rr.c')
-rw-r--r--rr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rr.c b/rr.c
index c8d75ad9..c971610e 100644
--- a/rr.c
+++ b/rr.c
@@ -686,10 +686,10 @@ ldns_strip_ws(char *line)
{
char *s = line, *e;
- for (s = line; *s && isspace(*s); s++)
+ for (s = line; *s && isspace((unsigned char)*s); s++)
;
- for (e = strchr(s, 0); e > s+2 && isspace(e[-1]) && e[-2] != '\\'; e--)
+ for (e = strchr(s, 0); e > s+2 && isspace((unsigned char)e[-1]) && e[-2] != '\\'; e--)
;
*e = 0;
@@ -742,7 +742,7 @@ ldns_rr_new_frm_fp_l(ldns_rr **newrr, FILE *fp, uint32_t *default_ttl, ldns_rdf
return LDNS_STATUS_SYNTAX_EMPTY;
}
- if (strncmp(line, "$ORIGIN", 7) == 0 && isspace(line[7])) {
+ if (strncmp(line, "$ORIGIN", 7) == 0 && isspace((unsigned char)line[7])) {
if (*origin) {
ldns_rdf_deep_free(*origin);
*origin = NULL;
@@ -756,7 +756,7 @@ ldns_rr_new_frm_fp_l(ldns_rr **newrr, FILE *fp, uint32_t *default_ttl, ldns_rdf
}
*origin = tmp;
s = LDNS_STATUS_SYNTAX_ORIGIN;
- } else if (strncmp(line, "$TTL", 4) == 0 && isspace(line[4])) {
+ } else if (strncmp(line, "$TTL", 4) == 0 && isspace((unsigned char)line[4])) {
if (default_ttl) {
*default_ttl = ldns_str2period(
ldns_strip_ws(line + 5), &endptr);