2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-02 23:55:27 +00:00

add CFG_LIST_FOREACH macro

replace the pattern `for (elt = cfg_list_first(x); elt != NULL;
elt = cfg_list_next(elt))` with a new `CFG_LIST_FOREACH` macro.
This commit is contained in:
Evan Hunt
2025-03-26 18:54:05 -07:00
parent f10f5572ac
commit 24d077afb0
19 changed files with 286 additions and 607 deletions

View File

@@ -3947,14 +3947,11 @@ isc_result_t
cfg_pluginlist_foreach(const cfg_obj_t *config, const cfg_obj_t *list,
pluginlist_cb_t *callback, void *callback_data) {
isc_result_t result = ISC_R_SUCCESS;
const cfg_listelt_t *element;
REQUIRE(config != NULL);
REQUIRE(callback != NULL);
for (element = cfg_list_first(list); element != NULL;
element = cfg_list_next(element))
{
CFG_LIST_FOREACH (list, element) {
const cfg_obj_t *plugin = cfg_listelt_value(element);
const cfg_obj_t *obj;
const char *type, *library;