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.
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;