mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03:00
conf: domain: Remove checking of return value of virHashCreateFull
This module has last two direct checks whether the value returned by virHashCreateFull is NULL. Remove them so that static analyzers don't get the false idea that checking the value is necessary. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
50f7483a0d
commit
2a5ea0a0c1
@ -1044,28 +1044,22 @@ virDomainPCIAddressSetExtensionAlloc(virDomainPCIAddressSetPtr addrs,
|
||||
if (VIR_ALLOC(addrs->zpciIds) < 0)
|
||||
return -1;
|
||||
|
||||
if (!(addrs->zpciIds->uids = virHashCreateFull(10, NULL,
|
||||
virZPCIAddrKeyCode,
|
||||
virZPCIAddrKeyEqual,
|
||||
virZPCIAddrKeyCopy,
|
||||
virZPCIAddrKeyPrintHuman,
|
||||
virZPCIAddrKeyFree)))
|
||||
goto error;
|
||||
addrs->zpciIds->uids = virHashCreateFull(10, NULL,
|
||||
virZPCIAddrKeyCode,
|
||||
virZPCIAddrKeyEqual,
|
||||
virZPCIAddrKeyCopy,
|
||||
virZPCIAddrKeyPrintHuman,
|
||||
virZPCIAddrKeyFree);
|
||||
|
||||
if (!(addrs->zpciIds->fids = virHashCreateFull(10, NULL,
|
||||
virZPCIAddrKeyCode,
|
||||
virZPCIAddrKeyEqual,
|
||||
virZPCIAddrKeyCopy,
|
||||
virZPCIAddrKeyPrintHuman,
|
||||
virZPCIAddrKeyFree)))
|
||||
goto error;
|
||||
addrs->zpciIds->fids = virHashCreateFull(10, NULL,
|
||||
virZPCIAddrKeyCode,
|
||||
virZPCIAddrKeyEqual,
|
||||
virZPCIAddrKeyCopy,
|
||||
virZPCIAddrKeyPrintHuman,
|
||||
virZPCIAddrKeyFree);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
virDomainPCIAddressSetExtensionFree(addrs);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user