diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2020-10-22 22:19:10 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2020-10-23 18:18:22 -0300 |
| commit | 8d869d378bf10ee02e4aed66c9c3c16f15fe0c26 (patch) | |
| tree | 04dadc1e6681ffa3f4939da8367889d62f95cdb5 /tools/gen_northbound_callbacks.c | |
| parent | 9bde0b256919ff3987ea60101229fec195324102 (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 'tools/gen_northbound_callbacks.c')
| -rw-r--r-- | tools/gen_northbound_callbacks.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/gen_northbound_callbacks.c b/tools/gen_northbound_callbacks.c index eaab932228..a785f43cdf 100644 --- a/tools/gen_northbound_callbacks.c +++ b/tools/gen_northbound_callbacks.c @@ -368,13 +368,12 @@ int main(int argc, char *argv[]) /* Generate callback prototypes. */ if (!static_cbs) { printf("/* prototypes */\n"); - yang_snodes_iterate_module(module->info, generate_prototypes, 0, - NULL); + yang_snodes_iterate(module->info, generate_prototypes, 0, NULL); printf("\n"); } /* Generate callback functions. */ - yang_snodes_iterate_module(module->info, generate_callbacks, 0, NULL); + yang_snodes_iterate(module->info, generate_callbacks, 0, NULL); strlcpy(module_name_underscores, module->name, sizeof(module_name_underscores)); @@ -386,7 +385,7 @@ int main(int argc, char *argv[]) "\t.name = \"%s\",\n" "\t.nodes = {\n", module_name_underscores, module->name); - yang_snodes_iterate_module(module->info, generate_nb_nodes, 0, NULL); + yang_snodes_iterate(module->info, generate_nb_nodes, 0, NULL); printf("\t\t{\n" "\t\t\t.xpath = NULL,\n" "\t\t},\n"); |
