correctly accolade ifs
@@ -849,10 +849,11 @@ zparser_conv_svcbparam_ipv4hint_value(region_type *region, const char *val)
for (i = 0, count = 1; val[i]; i++) {
if (val[i] == ',')
count += 1;
- if (count > SVCB_MAX_COMMA_SEPARATED_VALUES)
+ if (count > SVCB_MAX_COMMA_SEPARATED_VALUES) {
zc_error_prev_line("Too many IPV4 addresses in ipv4hint");
return alloc_rdata_init(region, "", 0);
}
+ }
/* count == number of comma's in val + 1, so the actual number of IPv4
* addresses in val
@@ -903,10 +904,11 @@ zparser_conv_svcbparam_ipv6hint_value(region_type *region, const char *val)
for (i = 0, count = 1; val[i]; i++) {
if (val[i] == ',')
count += 1;
- if (count > SVCB_MAX_COMMA_SEPARATED_VALUES)
+ if (count > SVCB_MAX_COMMA_SEPARATED_VALUES) {
zc_error_prev_line("Too many IPV6 addresses in ipv6hint");
return alloc_rdata_init(region, "", 0);
}
+ }
/* count == number of comma's in val + 1
* so actually the number of IPv6 addresses in val
@@ -963,10 +965,11 @@ zparser_conv_svcbparam_mandatory_value(region_type *region,
for (i = 0, count = 1; val[i]; i++) {
if (val[i] == ',')
count += 1;
- if (count > SVCB_MAX_COMMA_SEPARATED_VALUES)
+ if (count > SVCB_MAX_COMMA_SEPARATED_VALUES) {
zc_error_prev_line("Too many keys in mandatory");
return alloc_rdata_init(region, "", 0);
}
+ }
r = alloc_rdata(region, (2 + count) * sizeof(uint16_t));
r[1] = htons(SVCB_KEY_MANDATORY);
