From 419a22d5dbc5514a43ce8dab54f8382f6152e750 Mon Sep 17 00:00:00 2001 From: Erik Skultety Date: Thu, 15 Jan 2015 14:14:18 +0100 Subject: [PATCH] Remove dead code in qemuDomainAssignPCIAddresses We tested for positive return value from virDomainMaybeAddController, but it returns 0 or -1 only resulting in a dead code. Signed-off-by: Michal Privoznik --- src/qemu/qemu_command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8091fb3d45..91be16c504 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1509,9 +1509,9 @@ 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, - flags) < 0) - goto cleanup; + if (rv == 0 && + virDomainPCIAddressReserveNextSlot(addrs, &info, flags) < 0) + goto cleanup; } nbuses = addrs->nbuses; virDomainPCIAddressSetFree(addrs);