summaryrefslogtreecommitdiff
path: root/lib/northbound_oper.c
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2024-01-06 11:06:38 +0000
committerChristian Hopps <chopps@labn.net>2024-01-07 15:17:56 +0000
commit1e4229fc1f843f88e9c9bc6ec4700489a455e6cf (patch)
treefd0900c7b583456db1134205bd560712026558ed /lib/northbound_oper.c
parentcf67a7e26577b0dda276324b40a602ae084e504e (diff)
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 4e131154e7..78106e4e45 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;