summaryrefslogtreecommitdiffstats
path: root/lib/northbound_oper.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2024-01-06 12:06:38 +0100
committerChristian Hopps <chopps@labn.net>2024-01-07 16:17:56 +0100
commit1e4229fc1f843f88e9c9bc6ec4700489a455e6cf (patch)
treefd0900c7b583456db1134205bd560712026558ed /lib/northbound_oper.c
parentlib: mgmtd: implement full XPath 1.0 predicate functionality (diff)
downloadfrr-1e4229fc1f843f88e9c9bc6ec4700489a455e6cf.tar.xz
frr-1e4229fc1f843f88e9c9bc6ec4700489a455e6cf.zip
lib: use libyang functions if they are present
Add configure.ac tests for libyang functions, if not present supply the functionality ourselves in yang.[ch] Signed-off-by: Christian Hopps <chopps@labn.net>
Diffstat (limited to 'lib/northbound_oper.c')
-rw-r--r--lib/northbound_oper.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/northbound_oper.c b/lib/northbound_oper.c
index 4e131154e..78106e4e4 100644
--- a/lib/northbound_oper.c
+++ b/lib/northbound_oper.c
@@ -1409,11 +1409,8 @@ static enum nb_error __walk(struct nb_op_yield_state *ys, bool is_resume)
*/
if (!node) {
- /* NOTE: can also use lyd_new_list2 here when available */
err = yang_lyd_new_list(ni[-1].inner, sib,
- &ni->keys,
- (struct lyd_node_inner *
- *)&node);
+ &ni->keys, &node);
if (err) {
darr_pop(ys->node_infos);
ret = NB_ERR_RESOURCE;