Make it clearer that what we're trying to do is find @source and
@target_node so that the unattentive or code analysis utility
doesn't believe 'source' and 'target' could be found in the same
node element.
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
if (tmp->type != XML_ELEMENT_NODE)
continue;
- if (virXMLNodeNameEqual(tmp, "source"))
+ if (!source && virXMLNodeNameEqual(tmp, "source"))
source = tmp;
-
- if (virXMLNodeNameEqual(tmp, "target"))
+ else if (!target_node && virXMLNodeNameEqual(tmp, "target"))
target_node = tmp;
/*