]> git.ipfire.org Git - thirdparty/bind9.git/commit
switch to ISC_LIST_FOREACH everywhere
authorEvan Hunt <each@isc.org>
Fri, 21 Mar 2025 05:25:56 +0000 (22:25 -0700)
committerEvan Hunt <each@isc.org>
Mon, 31 Mar 2025 20:45:10 +0000 (13:45 -0700)
commit522ca7bb548d4047410e742cc5353dce3613a8db
treec9b0ec5e7a0f07d6ac4948317c34ba501a285f16
parent5cff8f9017dc025bb5a1922e9b4a1af1b3a5c8d2
switch to ISC_LIST_FOREACH everywhere

the pattern `for (x = ISC_LIST_HEAD(...); x != NULL; ISC_LIST_NEXT(...)`
has been changed to `ISC_LIST_FOREACH` throughout BIND, except in a few
cases where the change would be excessively complex.

in most cases this was a straightforward change. in some places,
however, the list element variable was referenced after the loop
ended, and the code was refactored to avoid this necessity.

also, because `ISC_LIST_FOREACH` uses typeof(list.head) to declare
the list elements, compilation failures can occur if the list object
has a `const` qualifier.  some `const` qualifiers have been removed
from function parameters to avoid this problem, and where that was not
possible, `UNCONST` was used.
66 files changed:
bin/delv/delv.c
bin/dig/dighost.c
bin/dig/host.c
bin/dig/nslookup.c
bin/dnssec/dnssec-cds.c
bin/dnssec/dnssec-keygen.c
bin/dnssec/dnssec-ksr.c
bin/dnssec/dnssec-signzone.c
bin/dnssec/dnssectool.c
bin/named/controlconf.c
bin/named/server.c
bin/named/statschannel.c
bin/named/zoneconf.c
bin/nsupdate/nsupdate.c
doc/dev/dev.md
lib/dns/acl.c
lib/dns/adb.c
lib/dns/db.c
lib/dns/diff.c
lib/dns/dispatch.c
lib/dns/dlz.c
lib/dns/dns64.c
lib/dns/dnssec.c
lib/dns/dyndb.c
lib/dns/forward.c
lib/dns/include/dns/diff.h
lib/dns/include/dns/rdatalist.h
lib/dns/include/dns/rdataset.h
lib/dns/journal.c
lib/dns/kasp.c
lib/dns/keymgr.c
lib/dns/keystore.c
lib/dns/keytable.c
lib/dns/order.c
lib/dns/peer.c
lib/dns/qp.c
lib/dns/qpzone.c
lib/dns/rdatalist.c
lib/dns/rdataset.c
lib/dns/resolver.c
lib/dns/rrl.c
lib/dns/skr.c
lib/dns/ssu.c
lib/dns/update.c
lib/dns/view.c
lib/dns/zone.c
lib/isc/job.c
lib/isc/log.c
lib/isc/mem.c
lib/isc/netmgr/http.c
lib/isc/netmgr/netmgr.c
lib/isccfg/aclconf.c
lib/isccfg/check.c
lib/isccfg/kaspconf.c
lib/isccfg/parser.c
lib/ns/client.c
lib/ns/hooks.c
lib/ns/interfacemgr.c
lib/ns/listenlist.c
lib/ns/query.c
lib/ns/update.c
tests/dns/dbdiff_test.c
tests/dns/diff_test.c
tests/dns/sigs_test.c
tests/dns/skr_test.c
tests/libtest/qp.c