]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Minor refactoring/cleanup
authorDiego Fronza <diego@isc.org>
Thu, 18 Jun 2020 17:35:09 +0000 (14:35 -0300)
committerEvan Hunt <each@isc.org>
Wed, 25 Aug 2021 21:23:26 +0000 (14:23 -0700)
This commit moves the warning message to the logical block where it
belongs better.

For more details check thread comment:
https://gitlab.isc.org/isc-projects/bind9/merge_requests/291#note_12167

lib/dns/zoneverify.c

index fcd8b1ddb4ddd818442e20ebaf682cb15132a18c..c54be29074f7a959e5ee96dc3ee6f8ea6fd26a78 100644 (file)
@@ -310,18 +310,18 @@ check_no_rrsig(const vctx_t *vctx, const dns_rdataset_t *rdataset,
                if (sigrdataset.type == dns_rdatatype_rrsig &&
                    sigrdataset.covers == rdataset->type)
                {
+                       dns_name_format(name, namebuf, sizeof(namebuf));
+                       dns_rdatatype_format(rdataset->type, typebuf,
+                                            sizeof(typebuf));
+                       zoneverify_log_error(
+                               vctx,
+                               "Warning: Found unexpected signatures "
+                               "for %s/%s",
+                               namebuf, typebuf);
                        break;
                }
                dns_rdataset_disassociate(&sigrdataset);
        }
-       if (result == ISC_R_SUCCESS) {
-               dns_name_format(name, namebuf, sizeof(namebuf));
-               dns_rdatatype_format(rdataset->type, typebuf, sizeof(typebuf));
-               zoneverify_log_error(vctx,
-                                    "Warning: Found unexpected signatures "
-                                    "for %s/%s",
-                                    namebuf, typebuf);
-       }
        if (dns_rdataset_isassociated(&sigrdataset)) {
                dns_rdataset_disassociate(&sigrdataset);
        }