提交 ce7af78e 编写于 作者: J John Ferlan

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: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 93b8c6b1
......@@ -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;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册