From: Alessio Podda Date: Wed, 3 Sep 2025 22:02:59 +0000 (+0200) Subject: fixup! Add slabheader foreach macro X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45305b8f18860ea143682e5616e5a6855291fb88;p=thirdparty%2Fbind9.git fixup! Add slabheader foreach macro --- diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index 6aec4e4435a..5ba57a0842d 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -1046,16 +1046,17 @@ setnsec3parameters(dns_db_t *db, qpz_version_t *version) { while (top != NULL && top->typepair != dns_rdatatype_nsec3param) { top = top->next; } - if (top != NULL) { - dns_slabheader_t *header = top->header; - while (header != NULL && - (IGNORE(header) || header->serial > version->serial)) - { - header = header->down; - } - if (header != NULL && EXISTS(header)) { - found = header; + if (top != NULL) { + SLABHEADER_FOREACH_SAFE(top->header, inner, down) { + if (inner->serial <= version->serial && + !IGNORE(inner)) + { + if (EXISTS(inner)) { + found = inner; + } + break; + } } }