From: Alessio Podda Date: Wed, 3 Sep 2025 23:58:28 +0000 (+0200) Subject: fixup! Torvalds style X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=740b2af42b1fe8a9001ae0dea75a935876ce77dc;p=thirdparty%2Fbind9.git fixup! Torvalds style --- diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index b011a0227e6..aa3d31980c3 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -842,32 +842,6 @@ clean_zone_node(qpznode_t *node, uint32_t least_serial) { } if (top->header == NULL) { - goto empty; - } - - /* - * We now try to find the first down node less than the least - * serial, and if there are such rdatasets, delete it and any - * older versions. - */ - dns_slabheader_t *dcurrent = NULL; - dns_slabheader_t *dcurrent_down = NULL, *dparent = NULL; - - dparent = top->header; - for (dcurrent = dparent->down; dcurrent != NULL; - dcurrent = dcurrent_down) - { - dcurrent_down = dcurrent->down; - if (dcurrent->serial < least_serial) { - dparent->down = dcurrent_down; - dns_slabheader_destroy(&dcurrent); - } else { - dparent = dcurrent; - } - } - - if (top->header == NULL) { - empty: if (top_prev != NULL) { top_prev->next = top->next; } else { @@ -875,6 +849,28 @@ clean_zone_node(qpznode_t *node, uint32_t least_serial) { } dns_slabtop_destroy(node->mctx, &top); } else { + + /* + * We now try to find the first down node less than the least + * serial, and if there are such rdatasets, delete it and any + * older versions. + */ + dns_slabheader_t *dcurrent = NULL; + dns_slabheader_t *dcurrent_down = NULL, *dparent = NULL; + + dparent = top->header; + for (dcurrent = dparent->down; dcurrent != NULL; + dcurrent = dcurrent_down) + { + dcurrent_down = dcurrent->down; + if (dcurrent->serial < least_serial) { + dparent->down = dcurrent_down; + dns_slabheader_destroy(&dcurrent); + } else { + dparent = dcurrent; + } + } + /* * Note. The serial number of 'current' might be less * than least_serial too, but we cannot delete it