From: Diego Fronza Date: Sat, 27 Jun 2020 19:37:23 +0000 (-0300) Subject: Avoid an empty block under if condition X-Git-Tag: v9.17.18~20^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=90e724af4571bd28586c0845c8b0fc59fc5b1d93;p=thirdparty%2Fbind9.git Avoid an empty block under if condition This commit doesn't change the logic flow from previous code, it only makes the code more readable and consistent. More details on thread: https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/291#note_12185 --- diff --git a/lib/dns/zoneverify.c b/lib/dns/zoneverify.c index 7ab2b510026..86f46b70921 100644 --- a/lib/dns/zoneverify.c +++ b/lib/dns/zoneverify.c @@ -1605,9 +1605,9 @@ check_dnskey(vctx_t *vctx) { RUNTIME_CHECK(result == ISC_R_SUCCESS); 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_KEYOWNER_ZONE) != 0 && + (dnskey.flags & DNS_KEYFLAG_REVOKE) != 0) + { if ((dnskey.flags & DNS_KEYFLAG_KSK) != 0 && !dns_dnssec_selfsigns(&rdata, vctx->origin, &vctx->keyset, &vctx->keysigs,