From: Diego Fronza Date: Thu, 18 Jun 2020 17:35:09 +0000 (-0300) Subject: Minor refactoring/cleanup X-Git-Tag: v9.17.18~20^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=966c06a9e69e21f4de2755f30d346dcfe6c735ad;p=thirdparty%2Fbind9.git Minor refactoring/cleanup 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 --- diff --git a/lib/dns/zoneverify.c b/lib/dns/zoneverify.c index fcd8b1ddb4d..c54be29074f 100644 --- a/lib/dns/zoneverify.c +++ b/lib/dns/zoneverify.c @@ -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); }