mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 01:18:00 +03:00
util: alloc: Completely replace VIR_APPEND_ELEMENT_QUIET by VIR_APPEND_ELEMENT
VIR_APPEND_ELEMENT doesn't report any errors now so we can remove VIR_APPEND_ELEMENT_QUIET and replace all uses by VIR_APPEND_ELEMENT Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
98f6f2081d
commit
f90de01763
@ -243,11 +243,6 @@ int virDeleteElementsN(void *ptrptr, size_t size, size_t at, size_t *countptr,
|
||||
VIR_TYPEMATCH(ptr, &(newelem)), \
|
||||
&(newelem), false, true)
|
||||
|
||||
/* Quiet version of macros above */
|
||||
#define VIR_APPEND_ELEMENT_QUIET(ptr, count, newelem) \
|
||||
virAppendElement(&(ptr), sizeof(*(ptr)), &(count), \
|
||||
VIR_TYPEMATCH(ptr, &(newelem)), &(newelem), true, false)
|
||||
|
||||
/**
|
||||
* VIR_DELETE_ELEMENT:
|
||||
* @ptr: pointer to array of objects (*not* ptr to ptr)
|
||||
|
@ -78,8 +78,8 @@ virFileWrapperAddPrefix(const char *prefix,
|
||||
|
||||
init_syms();
|
||||
|
||||
VIR_APPEND_ELEMENT_QUIET(prefixes, nprefixes, prefix);
|
||||
VIR_APPEND_ELEMENT_QUIET(overrides, noverrides, override);
|
||||
VIR_APPEND_ELEMENT(prefixes, nprefixes, prefix);
|
||||
VIR_APPEND_ELEMENT(overrides, noverrides, override);
|
||||
}
|
||||
|
||||
|
||||
|
@ -428,7 +428,7 @@ pci_device_create_iommu(const struct pciDevice *dev,
|
||||
iommuGroup->iommu = dev->iommuGroup;
|
||||
iommuGroup->nDevicesBoundToVFIO = 0; /* No device bound to VFIO by default */
|
||||
|
||||
VIR_APPEND_ELEMENT_QUIET(pciIommuGroups, npciIommuGroups, iommuGroup);
|
||||
VIR_APPEND_ELEMENT(pciIommuGroups, npciIommuGroups, iommuGroup);
|
||||
}
|
||||
|
||||
|
||||
@ -542,7 +542,7 @@ pci_device_new_from_stub(const struct pciDevice *data)
|
||||
if (pci_device_autobind(dev) < 0)
|
||||
ABORT("Unable to bind: %s", devid);
|
||||
|
||||
VIR_APPEND_ELEMENT_QUIET(pciDevices, nPCIDevices, dev);
|
||||
VIR_APPEND_ELEMENT(pciDevices, nPCIDevices, dev);
|
||||
}
|
||||
|
||||
static struct pciDevice *
|
||||
@ -713,7 +713,7 @@ pci_driver_new(const char *name, ...)
|
||||
make_file(driverpath, "bind", NULL, -1);
|
||||
make_file(driverpath, "unbind", NULL, -1);
|
||||
|
||||
VIR_APPEND_ELEMENT_QUIET(pciDrivers, nPCIDrivers, driver);
|
||||
VIR_APPEND_ELEMENT(pciDrivers, nPCIDrivers, driver);
|
||||
}
|
||||
|
||||
static struct pciDriver *
|
||||
|
Loading…
Reference in New Issue
Block a user