mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
util: Remove NONNULL(1) for virHostdevPrepareDomainDevices
Since the code checks 'mgr == NULL' anyway, no need for the prototype to have the NONNULL arg check. Also add an error message to indicate what the failure is so that there isn't a failed for some reason error. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
47dcce2f08
commit
40f2a476d1
@ -1873,8 +1873,11 @@ virHostdevPrepareDomainDevices(virHostdevManagerPtr mgr,
|
||||
if (!def->nhostdevs)
|
||||
return 0;
|
||||
|
||||
if (mgr == NULL)
|
||||
if (!mgr) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("no host device manager defined"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (flags & VIR_HOSTDEV_SP_PCI) {
|
||||
if (virHostdevPreparePCIDevices(mgr, driver,
|
||||
|
@ -157,7 +157,7 @@ virHostdevPrepareDomainDevices(virHostdevManagerPtr mgr,
|
||||
const char *driver,
|
||||
virDomainDefPtr def,
|
||||
unsigned int flags)
|
||||
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
||||
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
|
||||
void
|
||||
virHostdevReAttachDomainDevices(virHostdevManagerPtr mgr,
|
||||
const char *driver,
|
||||
|
Loading…
x
Reference in New Issue
Block a user