From c57188992ba76fef5046eb530274ed363a017ebe Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Sun, 28 Apr 2024 19:38:17 +0200 Subject: [PATCH] Optimize get autocli config --- lib/src/clixon_data.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/src/clixon_data.c b/lib/src/clixon_data.c index ba0e6d19..ecdc6162 100644 --- a/lib/src/clixon_data.c +++ b/lib/src/clixon_data.c @@ -572,8 +572,9 @@ clicon_conf_autocli(clixon_handle h) { cxobj *xconfig = NULL; - if ((xconfig = clicon_conf_xml(h)) != NULL) /* Get local config */ - return xpath_first(xconfig, NULL, "autocli"); + if ((xconfig = clicon_conf_xml(h)) != NULL){ /* Get local config */ + return xml_find_type(xconfig, NULL, "autocli", CX_ELMNT); + } return NULL; }