Commit 735be3b8 authored by Evan Hunt's avatar Evan Hunt

remove or comment empty conditional branches

some empty conditional branches which contained a semicolon were
"fixed" by clang-format to contain nothing. add comments to prevent this.
parent 8915e472
......@@ -1647,6 +1647,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
} else if (strcasecmp(arg, "maintain") == 0) {
allow = maint = true;
} else if (strcasecmp(arg, "off") == 0) {
/* Default */
} else {
INSIST(0);
ISC_UNREACHABLE();
......@@ -1801,6 +1802,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
dns_zone_setkeyopt(zone, DNS_ZONEKEY_NORESIGN,
true);
} else if (strcasecmp(arg, "maintain") == 0) {
/* Default */
} else {
INSIST(0);
ISC_UNREACHABLE();
......
......@@ -78,7 +78,7 @@ fromtext_in_wks(ARGS_FROMTEXT) {
isc_token_t token;
isc_region_t region;
struct in_addr addr;
char *e;
char *e = NULL;
long proto;
unsigned char bm[8 * 1024]; /* 64k bits */
long port;
......@@ -138,8 +138,7 @@ fromtext_in_wks(ARGS_FROMTEXT) {
false));
proto = strtol(DNS_AS_STR(token), &e, 10);
if (*e == 0) {
} else if (!mygetprotobyname(DNS_AS_STR(token), &proto)) {
if (*e != '\0' && !mygetprotobyname(DNS_AS_STR(token), &proto)) {
CHECKTOK(DNS_R_UNKNOWNPROTO);
}
......@@ -175,9 +174,8 @@ fromtext_in_wks(ARGS_FROMTEXT) {
}
port = strtol(DNS_AS_STR(token), &e, 10);
if (*e == 0) {
} else if (!mygetservbyname(service, ps, &port) &&
!mygetservbyname(DNS_AS_STR(token), ps, &port))
if (*e != 0 && !mygetservbyname(service, ps, &port) &&
!mygetservbyname(DNS_AS_STR(token), ps, &port))
{
CHECKTOK(DNS_R_UNKNOWNSERVICE);
}
......
......@@ -1611,6 +1611,7 @@ check_dnskey(vctx_t *vctx) {
is_ksk = ((dnskey.flags & DNS_KEYFLAG_KSK) != 0);
if ((dnskey.flags & DNS_KEYOWNER_ZONE) == 0) {
/* Non zone key, skip. */
} else if ((dnskey.flags & DNS_KEYFLAG_REVOKE) != 0) {
if ((dnskey.flags & DNS_KEYFLAG_KSK) != 0 &&
!dns_dnssec_selfsigns(&rdata, vctx->origin,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment