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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user