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

Re: [libvirt] [PATCH] qemu: Remove code duplication



On 08/20/2010 06:03 AM, Jiri Denemark wrote:
> We already filled the PCI address structure when we checked whether it's
> free or not, so let's just use the structure here instead of filling it
> again.
> ---
>  src/qemu/qemu_conf.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index c7ed0a3..1c98447 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -2258,9 +2258,7 @@ int qemuDomainPCIAddressSetNextAddr(qemuDomainPCIAddressSetPtr addrs,
>          }
>  
>          dev->type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
> -        dev->addr.pci.domain = 0;
> -        dev->addr.pci.bus = 0;
> -        dev->addr.pci.slot = i;
> +        dev->addr.pci = maybe.addr.pci;

ACK.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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