diff options
| author | Jafar Al-Gharaibeh <Jafaral@users.noreply.github.com> | 2019-07-09 17:59:17 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-09 17:59:17 +0300 |
| commit | 7bc33bcc1996b554328792d80a8e5557ccaba6f5 (patch) | |
| tree | 9666c3d7f95fd4246b9ff6248994973cdaef38f7 /lib/northbound.c | |
| parent | 379ae68584f6b32db268d83651ca1bd39688f891 (diff) | |
| parent | dfe2273849bcf693ea1c56be4e89456a21a9a526 (diff) | |
Merge pull request #4088 from opensourcerouting/bump-libyang-requirement-vers
build, lib: bump libyang requirement version to >= 0.16.105 (-r3)
Diffstat (limited to 'lib/northbound.c')
| -rw-r--r-- | lib/northbound.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/northbound.c b/lib/northbound.c index b2ae1f66cb..48b450e969 100644 --- a/lib/northbound.c +++ b/lib/northbound.c @@ -1386,19 +1386,12 @@ int nb_oper_data_iterate(const char *xpath, struct yang_translator *translator, */ ly_errno = 0; dnode = lyd_new_path(NULL, ly_native_ctx, xpath, NULL, 0, - LYD_PATH_OPT_UPDATE); - if (!dnode && ly_errno) { + LYD_PATH_OPT_UPDATE | LYD_PATH_OPT_NOPARENTRET); + if (!dnode) { flog_warn(EC_LIB_LIBYANG, "%s: lyd_new_path() failed", __func__); return NB_ERR; } - /* - * We can remove the following two lines once we depend on - * libyang-v0.16-r2, which has the LYD_PATH_OPT_NOPARENTRET flag for - * lyd_new_path(). - */ - dnode = yang_dnode_get(dnode, xpath); - assert(dnode); /* * Create a linked list to sort the data nodes starting from the root. |
