]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Avoid an empty block under if condition
authorDiego Fronza <diego@isc.org>
Sat, 27 Jun 2020 19:37:23 +0000 (16:37 -0300)
committerEvan Hunt <each@isc.org>
Wed, 25 Aug 2021 22:10:27 +0000 (15:10 -0700)
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

lib/dns/zoneverify.c

index 7ab2b51002600f6719b67f436b748a2355a10c70..86f46b7092160e1e48a3cfbbf415f51ca5c6920f 100644 (file)
@@ -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,