We tested for positive return value from virDomainMaybeAddController,
but it returns 0 or -1 only resulting in a dead code.
---
src/qemu/qemu_command.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 06def5f..1671e11 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1509,7 +1509,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
i, bus->model)) < 0)
goto cleanup;
/* If we added a new bridge, we will need one more address */
- if (rv > 0 && virDomainPCIAddressReserveNextSlot(addrs,
&info,
+ if (rv == 0 && virDomainPCIAddressReserveNextSlot(addrs,
&info,
flags) < 0)
goto cleanup;
}
--
1.9.3