diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index f149ff9c676a6dbc8094b35647541e68664ea453..25aab396755d5075151e01d57905da1f49191494 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -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; }