Optimize get autocli config

This commit is contained in:
Olof hagsand 2024-04-28 19:38:17 +02:00
parent 7e1a00669c
commit c57188992b

View file

@ -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;
}