"xmlNextElementSibling()" skips attribute nodes, making the explicit check for the type of `cur` redundant. This prepares for the removal of this check in the next commit. Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx> --- src/conf/nwfilter_params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/nwfilter_params.c b/src/conf/nwfilter_params.c index c94e9679f8..3754cec55f 100644 --- a/src/conf/nwfilter_params.c +++ b/src/conf/nwfilter_params.c @@ -703,7 +703,7 @@ virNWFilterParseParamAttributes(xmlNodePtr cur) GHashTable *table = virHashNew(virNWFilterVarValueHashFree); - cur = cur->children; + cur = xmlFirstElementChild(cur); while (cur != NULL) { if (cur->type == XML_ELEMENT_NODE) { @@ -739,7 +739,7 @@ virNWFilterParseParamAttributes(xmlNodePtr cur) VIR_FREE(val); } } - cur = cur->next; + cur = xmlNextElementSibling(cur); } return table; -- 2.31.1