mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
virsh: Adjust logic checks in virshUpdateDiskXML
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>
This commit is contained in:
@@ -12476,10 +12476,9 @@ virshUpdateDiskXML(xmlNodePtr disk_node,
|
|||||||
if (tmp->type != XML_ELEMENT_NODE)
|
if (tmp->type != XML_ELEMENT_NODE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (virXMLNodeNameEqual(tmp, "source"))
|
if (!source && virXMLNodeNameEqual(tmp, "source"))
|
||||||
source = tmp;
|
source = tmp;
|
||||||
|
else if (!target_node && virXMLNodeNameEqual(tmp, "target"))
|
||||||
if (virXMLNodeNameEqual(tmp, "target"))
|
|
||||||
target_node = tmp;
|
target_node = tmp;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user