From e1e391ad0d2b60df0f116214b3d75fdba3793139 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Tue, 23 Feb 2021 15:33:53 +0100 Subject: [PATCH] * Fixed: [Recursive calling xml_apply_ancestor is no need #180](https://github.com/clicon/clixon/issues/180) --- CHANGELOG.md | 1 + lib/src/clixon_xml.c | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f471a0e9..1a4cc108 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -119,6 +119,7 @@ Developers may need to change their code ### Corrected Bugs +* Fixed: [Recursive calling xml_apply_ancestor is no need #180](https://github.com/clicon/clixon/issues/180) * Fixed: [Negation operator in 'must' statement makes backend segmentation fault](https://github.com/clicon/clixon/issues/179) * Fixed extension/unknown problem shown in latest openconfig where other than a single space was used between the unknown identifier and string * Fixed: [Augment that reference a submodule as target node fails #178](https://github.com/clicon/clixon/issues/178) diff --git a/lib/src/clixon_xml.c b/lib/src/clixon_xml.c index 32517bde..af13b51b 100644 --- a/lib/src/clixon_xml.c +++ b/lib/src/clixon_xml.c @@ -2192,9 +2192,7 @@ xml_apply_ancestor(cxobj *xn, int ret; while ((xp = xml_parent(xn)) != NULL) { - if (fn(xp, arg) < 0) - goto done; - if ((ret = xml_apply_ancestor(xp, fn, arg)) < 0) + if ((ret = fn(xp, arg)) < 0) goto done; if (ret > 0){ retval = ret;