From: John Ferlan Date: Tue, 21 Mar 2017 18:25:43 +0000 (-0400) Subject: util: Remove NONNULL(2,3) for virHostdevReAttachUSBDevices X-Git-Tag: v3.2.0-rc1~173 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ceaf3274756c5dc3d9885d80863b76cac09201ae;p=thirdparty%2Flibvirt.git util: Remove NONNULL(2,3) for virHostdevReAttachUSBDevices The comparison code used STREQ_NULLABLE anyway for both 'drv_name' and 'dom_name', so no need. Add a NULLSTR on the 'dom_name' too. Signed-off-by: John Ferlan --- diff --git a/src/util/virhostdev.c b/src/util/virhostdev.c index 86ca8e0473..c424a970f7 100644 --- a/src/util/virhostdev.c +++ b/src/util/virhostdev.c @@ -1624,7 +1624,7 @@ virHostdevReAttachUSBDevices(virHostdevManagerPtr mgr, if (!(usb = virUSBDeviceNew(usbsrc->bus, usbsrc->device, NULL))) { VIR_WARN("Unable to reattach USB device %03d.%03d on domain %s", - usbsrc->bus, usbsrc->device, dom_name); + usbsrc->bus, usbsrc->device, NULLSTR(dom_name)); continue; } diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h index 4ce5c4de54..76039bb600 100644 --- a/src/util/virhostdev.h +++ b/src/util/virhostdev.h @@ -110,7 +110,7 @@ virHostdevReAttachUSBDevices(virHostdevManagerPtr hostdev_mgr, const char *dom_name, virDomainHostdevDefPtr *hostdevs, int nhostdevs) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); + ATTRIBUTE_NONNULL(1); void virHostdevReAttachSCSIDevices(virHostdevManagerPtr hostdev_mgr, const char *drv_name,