From 966c06a9e69e21f4de2755f30d346dcfe6c735ad Mon Sep 17 00:00:00 2001 From: Diego Fronza Date: Thu, 18 Jun 2020 14:35:09 -0300 Subject: [PATCH] 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 --- lib/dns/zoneverify.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/dns/zoneverify.c b/lib/dns/zoneverify.c index fcd8b1ddb4..c54be29074 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); }