mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user