提交 7fb34351 编写于 作者: J Jiri Denemark

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.
上级 1208e6e4
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册