1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

hostdev: Remove explicit NULL checks

NULL checks are performed implicitly in the rest of the module,
including other allocations in the very same function.
This commit is contained in:
Andrea Bolognani 2016-02-25 14:50:54 +01:00
parent a54de18a54
commit 12a1631440

View File

@ -142,16 +142,16 @@ virHostdevManagerNew(void)
if (!(hostdevMgr = virObjectNew(virHostdevManagerClass))) if (!(hostdevMgr = virObjectNew(virHostdevManagerClass)))
return NULL; return NULL;
if ((hostdevMgr->activePCIHostdevs = virPCIDeviceListNew()) == NULL) if (!(hostdevMgr->activePCIHostdevs = virPCIDeviceListNew()))
goto error; goto error;
if ((hostdevMgr->activeUSBHostdevs = virUSBDeviceListNew()) == NULL) if (!(hostdevMgr->activeUSBHostdevs = virUSBDeviceListNew()))
goto error; goto error;
if ((hostdevMgr->inactivePCIHostdevs = virPCIDeviceListNew()) == NULL) if (!(hostdevMgr->inactivePCIHostdevs = virPCIDeviceListNew()))
goto error; goto error;
if ((hostdevMgr->activeSCSIHostdevs = virSCSIDeviceListNew()) == NULL) if (!(hostdevMgr->activeSCSIHostdevs = virSCSIDeviceListNew()))
goto error; goto error;
if (privileged) { if (privileged) {