提交 2d61934a 编写于 作者: J Ján Tomko

Remove useless variable in qemuDomainAssignAddresses

We do not need to propagate the exact return values
and the only possible ones are 0 and -1 anyway.

Remove the temporary variable and use the usual pattern:

if (f() < 0)
    return -1;
上级 7c6733a2
......@@ -1644,23 +1644,21 @@ qemuDomainAssignAddresses(virDomainDefPtr def,
virQEMUCapsPtr qemuCaps,
virDomainObjPtr obj)
{
int rc;
rc = qemuDomainAssignVirtioSerialAddresses(def, obj);
if (rc)
return rc;
if (qemuDomainAssignVirtioSerialAddresses(def, obj) < 0)
return -1;
rc = qemuDomainAssignSpaprVIOAddresses(def, qemuCaps);
if (rc)
return rc;
if (qemuDomainAssignSpaprVIOAddresses(def, qemuCaps) < 0)
return -1;
rc = qemuDomainAssignS390Addresses(def, qemuCaps, obj);
if (rc)
return rc;
if (qemuDomainAssignS390Addresses(def, qemuCaps, obj) < 0)
return -1;
qemuDomainAssignARMVirtioMMIOAddresses(def, qemuCaps);
return qemuDomainAssignPCIAddresses(def, qemuCaps, obj);
if (qemuDomainAssignPCIAddresses(def, qemuCaps, obj) < 0)
return -1;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册