On 25.05.2016 00:53, John Ferlan wrote:
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.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu_domain_address.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 7bd8ee5..95c11fa 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*/
While touching this code, can you please help my CDO [*] and insert a
space at the end of the comment?
+ virDomainPCIAddressSetFree(priv->pciaddrs);
+ priv->persistentAddrs = 1;
+ priv->pciaddrs = addrs;
+ addrs = NULL;
}
ret = 0;
* CDO is something like OCD, except letters are in alphabetical order.
Like they should be.
Michal