From: Jiri Denemark Date: Fri, 20 Aug 2010 11:57:35 +0000 (+0200) Subject: qemu: Remove code duplication X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7fb34351860b45f55eede96d175ece47ef65e36e;p=libvirt.git qemu: Remove code duplication 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. --- diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index c7ed0a336b..1c98447f27 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; addrs->nextslot = i + 1; if (QEMU_PCI_ADDRESS_LAST_SLOT < addrs->nextslot)