mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 20:01:16 +00:00
qemu: Remove dead code in qemuDomainAssignPCIAddresses revert patch
As it turned out, fix of dead code 419a22 changed the affected condition from "never true" to "always true", so better fix would be to change the return code of virDomainMaybeAddController from 0 to 1 if a new bridge has been added, thus distinguishing case when we didn't need to add any controller and case we successfully added one. The return code is changed in the next commit
This commit is contained in:
parent
d66e136bd5
commit
2fbfb3ac41
@ -1510,7 +1510,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
|
|||||||
i, bus->model)) < 0)
|
i, bus->model)) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
/* If we added a new bridge, we will need one more address */
|
/* If we added a new bridge, we will need one more address */
|
||||||
if (rv == 0 &&
|
if (rv > 0 &&
|
||||||
virDomainPCIAddressReserveNextSlot(addrs, &info, flags) < 0)
|
virDomainPCIAddressReserveNextSlot(addrs, &info, flags) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user