From: Evan Hunt Date: Mon, 31 Mar 2025 21:21:06 +0000 (+0000) Subject: fix: dev: Switch to ISC_LIST_FOREACH everywhere X-Git-Tag: v9.21.7~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04cf3ba91f1295444f76ef0b0f16002d7d9c3696;p=thirdparty%2Fbind9.git fix: dev: 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. Where possible, code has now been refactored to avoid this necessity. `ISC_LIST_FOREACH` has also been modified to use `typeof(list.head)` to declare list elements automatically. When the list object to be iterated is declared with a `const` qualifier, the qualifier is passed along to the element declaration, causing a compilation failure. To avoid this problem, some `const` qualifiers have been removed; where that was not possible, `UNCONST` was used. Merge branch 'each-isc-list-foreach' into 'main' See merge request isc-projects/bind9!10310 --- 04cf3ba91f1295444f76ef0b0f16002d7d9c3696