summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nsd/zonec.c
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2015-02-03 10:40:01 +0000
committerbrad <brad@openbsd.org>2015-02-03 10:40:01 +0000
commitc1404d4fd7eb92119553dd80a5afc6e7bd064e28 (patch)
tree7d548939729ef16e70a07e0c402608f5a351d99c /usr.sbin/nsd/zonec.c
parentzap scp urls from quirks update for fw_update (diff)
downloadwireguard-openbsd-c1404d4fd7eb92119553dd80a5afc6e7bd064e28.tar.xz
wireguard-openbsd-c1404d4fd7eb92119553dd80a5afc6e7bd064e28.zip
merge conflicts
Diffstat (limited to 'usr.sbin/nsd/zonec.c')
-rw-r--r--usr.sbin/nsd/zonec.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/usr.sbin/nsd/zonec.c b/usr.sbin/nsd/zonec.c
index 3a85ed48a7f..ae1aa0373a3 100644
--- a/usr.sbin/nsd/zonec.c
+++ b/usr.sbin/nsd/zonec.c
@@ -108,7 +108,7 @@ zparser_conv_hex(region_type *region, const char *hex, size_t len)
} else {
zc_error_prev_line(
"illegal hex character '%c'",
- (int)(unsigned char) *hex);
+ (int) *hex);
return NULL;
}
++hex;
@@ -149,7 +149,7 @@ zparser_conv_hex_length(region_type *region, const char *hex, size_t len)
} else {
zc_error_prev_line(
"illegal hex character '%c'",
- (int)(unsigned char) *hex);
+ (int) *hex);
return NULL;
}
++hex;
@@ -388,7 +388,6 @@ zparser_conv_ilnp64(region_type *region, const char *text)
int ngroups, num;
unsigned long hex;
const char *ch;
- int c;
char digits[ILNP_MAXDIGITS+1];
unsigned int ui[ILNP_NUMGROUPS];
uint16_t a[ILNP_NUMGROUPS];
@@ -415,10 +414,9 @@ zparser_conv_ilnp64(region_type *region, const char *text)
} else {
/* Our grammar is stricter than the one accepted by
* strtol. */
- c = (unsigned char) *ch;
- if (!isxdigit(c)) {
+ if (!isxdigit((unsigned char)*ch)) {
zc_error_prev_line("ilnp64: invalid "
- "(non-hexadecimal) character %c", c);
+ "(non-hexadecimal) character %c", *ch);
return NULL;
}
if (num >= ILNP_MAXDIGITS) {
@@ -510,12 +508,11 @@ zparser_conv_eui(region_type *region, const char *text, size_t len)
nnum = len/8;
num = 1;
for (ch = text; *ch != '\0'; ch++) {
- int c = (unsigned char) *ch;
if (*ch == '-') {
num++;
- } else if (!isxdigit(c)) {
+ } else if (!isxdigit((unsigned char)*ch)) {
zc_error_prev_line("eui%u: invalid (non-hexadecimal) "
- "character %c", (unsigned) len, c);
+ "character %c", (unsigned) len, *ch);
return NULL;
}
}