]> git.ipfire.org Git - thirdparty/bind9.git/commit
Reduce the code duplication around getting slabheaders from slabtop
authorOndřej Surý <ondrej@isc.org>
Tue, 9 Sep 2025 09:32:17 +0000 (11:32 +0200)
committerOndřej Surý <ondrej@isc.org>
Wed, 10 Sep 2025 08:18:48 +0000 (10:18 +0200)
commit4dc711ef861df3aef14d48e46008c5b5abb257e0
tree8017a7e8d58562ecaaa51c73c5bd03b64362f7d3
parent5fcc063ce9a875c637f6279d67b6a9697f63796c
Reduce the code duplication around getting slabheaders from slabtop

There was a lot of duplicated code around getting the first header that
exists, is active, and matches the version header from the qpzonedb.
Move the duplicate code into a helper function and unify the same
approach for the qpcache too even though the code is much simpler there.
It should come handy when top->header is something more complicated than
a pointer to first slabheader.
lib/dns/qpcache.c
lib/dns/qpzone.c