summaryrefslogtreecommitdiff
path: root/lib/northbound.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-10-22 22:19:10 -0300
committerRenato Westphal <renato@opensourcerouting.org>2020-10-23 18:18:22 -0300
commit8d869d378bf10ee02e4aed66c9c3c16f15fe0c26 (patch)
tree04dadc1e6681ffa3f4939da8367889d62f95cdb5 /lib/northbound.c
parent9bde0b256919ff3987ea60101229fec195324102 (diff)
lib: combine two YANG schema iteration functions into one
Combine yang_snodes_iterate_module() and yang_snodes_iterate_all() into an unified yang_snodes_iterate() function, where the first "module" parameter is optional. There's no point in having two separate YANG schema iteration functions anymore now that they are too similar. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/northbound.c')
-rw-r--r--lib/northbound.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/northbound.c b/lib/northbound.c
index e79ccc7dd0..a978c7fe78 100644
--- a/lib/northbound.c
+++ b/lib/northbound.c
@@ -162,12 +162,12 @@ static int nb_node_del_cb(const struct lys_node *snode, void *arg)
void nb_nodes_create(void)
{
- yang_snodes_iterate_all(nb_node_new_cb, 0, NULL);
+ yang_snodes_iterate(NULL, nb_node_new_cb, 0, NULL);
}
void nb_nodes_delete(void)
{
- yang_snodes_iterate_all(nb_node_del_cb, 0, NULL);
+ yang_snodes_iterate(NULL, nb_node_del_cb, 0, NULL);
}
struct nb_node *nb_node_find(const char *xpath)
@@ -2254,7 +2254,7 @@ void nb_init(struct thread_master *tm,
nb_load_callbacks(modules[i]);
/* Validate northbound callbacks. */
- yang_snodes_iterate_all(nb_node_validate, 0, &errors);
+ yang_snodes_iterate(NULL, nb_node_validate, 0, &errors);
if (errors > 0) {
flog_err(
EC_LIB_NB_CBS_VALIDATION,