From: John Ferlan Date: Fri, 20 May 2016 11:41:09 +0000 (-0400) Subject: qemu: Remove dead code X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f30672d5ee509fac136905c141d28e5f4325ae5b;p=libvirt.git qemu: Remove dead code Since commit id '20a0fa8e' removed the QEMU_CAPS_DEVICE, Coverity notes that it's no longer possible to have 'addrs' be NULL when checking for a live domain since qemuDomainPCIAddressSetCreate would have jumped to cleanup if addrs was NULL. --- diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 7bd8ee58c7..0312d5011a 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1614,15 +1614,11 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, if (obj && obj->privateData) { priv = obj->privateData; - if (addrs) { - /* if this is the live domain object, we persist the PCI addresses*/ - virDomainPCIAddressSetFree(priv->pciaddrs); - priv->persistentAddrs = 1; - priv->pciaddrs = addrs; - addrs = NULL; - } else { - priv->persistentAddrs = 0; - } + /* if this is the live domain object, we persist the PCI addresses */ + virDomainPCIAddressSetFree(priv->pciaddrs); + priv->persistentAddrs = 1; + priv->pciaddrs = addrs; + addrs = NULL; } ret = 0;