mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03: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:
parent
93b8c6b119
commit
ce7af78e39
@ -12476,10 +12476,9 @@ virshUpdateDiskXML(xmlNodePtr disk_node,
|
||||
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;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user