"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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
GHashTable *table = virHashNew(virNWFilterVarValueHashFree);
- cur = cur->children;
+ cur = xmlFirstElementChild(cur);
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
VIR_FREE(val);
}
}
- cur = cur->next;
+ cur = xmlNextElementSibling(cur);
}
return table;