From: Alessio Podda Date: Thu, 4 Sep 2025 00:24:53 +0000 (+0200) Subject: fixup! fixup! Torvalds style X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c2a3338efa519eed30d9da1ba3b4bf69732c649;p=thirdparty%2Fbind9.git fixup! fixup! Torvalds style --- diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index aa3d31980c3..8182d51093a 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -814,7 +814,6 @@ qpznode_acquire(qpznode_t *node DNS__DB_FLARG) { static void clean_zone_node(qpznode_t *node, uint32_t least_serial) { - dns_slabtop_t *top_prev = NULL; bool still_dirty = false; /* @@ -840,16 +839,10 @@ clean_zone_node(qpznode_t *node, uint32_t least_serial) { parent_serial = child->serial; } } + } - if (top->header == NULL) { - if (top_prev != NULL) { - top_prev->next = top->next; - } else { - node->data = top->next; - } - dns_slabtop_destroy(node->mctx, &top); - } else { - + DNS_SLABTOP_FOREACH(top, node->data) { + if (top->header != NULL) { /* * We now try to find the first down node less than the least * serial, and if there are such rdatasets, delete it and any @@ -877,9 +870,23 @@ clean_zone_node(qpznode_t *node, uint32_t least_serial) { * because it is the most recent version. */ still_dirty = true; + } + } + + dns_slabtop_t *top_prev = NULL; + DNS_SLABTOP_FOREACH(top, node->data) { + if (top->header == NULL) { + if (top_prev != NULL) { + top_prev->next = top->next; + } else { + node->data = top->next; + } + dns_slabtop_destroy(node->mctx, &top); + } else { top_prev = top; } } + if (!still_dirty) { node->dirty = false; }