From 1af53a32ce4ebfea64dcc4ec45f4fd2785a34735 Mon Sep 17 00:00:00 2001 From: Dave Cornejo Date: Fri, 13 Nov 2020 11:41:31 -0500 Subject: [PATCH] make xml2xpath1() less picky this function would never traverse up an XML tree from a node that was not bound to a YANG model. this prevents the function from working in some cases where it could. --- lib/src/clixon_xml_map.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/src/clixon_xml_map.c b/lib/src/clixon_xml_map.c index 04b3c0c1..e45f0e2c 100644 --- a/lib/src/clixon_xml_map.c +++ b/lib/src/clixon_xml_map.c @@ -1503,8 +1503,7 @@ xml2xpath1(cxobj *x, char *b; enum rfc_6020 keyword; - if ((xp = xml_parent(x)) != NULL && - xml_spec(xp) != NULL) + if (xp = xml_parent(x)) xml2xpath1(xp, cb); /* XXX: sometimes there should be a /, sometimes not */ cprintf(cb, "/%s", xml_name(x));