mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
implicitly declare list elements in ISC_LIST_FOREACH macros
ISC_LIST_FOREACH and related macros now use 'typeof(list.head)' to declare the list elements automatically; the caller no longer needs to do so. ISC_LIST_FOREACH_SAFE also now implicitly declares its own 'next' pointer, so it only needs three parameters instead of four.
This commit is contained in:
@@ -437,9 +437,7 @@ isc_logconfig_destroy(isc_logconfig_t **lcfgp) {
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(lcfg->channellists); i++) {
|
||||
isc_logchannellist_t *item = NULL, *next = NULL;
|
||||
ISC_LIST_FOREACH_SAFE (lcfg->channellists[i], item, link, next)
|
||||
{
|
||||
ISC_LIST_FOREACH_SAFE (lcfg->channellists[i], item, link) {
|
||||
ISC_LIST_UNLINK(lcfg->channellists[i], item, link);
|
||||
isc_mem_put(mctx, item, sizeof(*item));
|
||||
}
|
||||
|
Reference in New Issue
Block a user