mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virNWFilterParseParamAttributes: Remove tautological if
`cur` is guaranteed to be of type `XML_ELEMENT_NODE` by using `xmlFirstElementChild()` and `xmlNextElementSibling()`. Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
71a2cdb8ec
commit
ec5838fc17
@ -706,7 +706,6 @@ virNWFilterParseParamAttributes(xmlNodePtr cur)
|
||||
cur = xmlFirstElementChild(cur);
|
||||
|
||||
while (cur != NULL) {
|
||||
if (cur->type == XML_ELEMENT_NODE) {
|
||||
if (virXMLNodeNameEqual(cur, "parameter")) {
|
||||
nam = virXMLPropString(cur, "name");
|
||||
val = virXMLPropString(cur, "value");
|
||||
@ -738,7 +737,7 @@ virNWFilterParseParamAttributes(xmlNodePtr cur)
|
||||
VIR_FREE(nam);
|
||||
VIR_FREE(val);
|
||||
}
|
||||
}
|
||||
|
||||
cur = xmlNextElementSibling(cur);
|
||||
}
|
||||
return table;
|
||||
|
Loading…
Reference in New Issue
Block a user