Re: [PATCH 2/3] Remove dead code in qemuDomainAssignPCIAddresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 15.01.2015 14:14, Erik Skultety wrote:
> 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)

Indentation's off.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]