]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Remove NONNULL(2,3) for virHostdevReAttachUSBDevices
authorJohn Ferlan <jferlan@redhat.com>
Tue, 21 Mar 2017 18:25:43 +0000 (14:25 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 22 Mar 2017 17:49:59 +0000 (13:49 -0400)
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 <jferlan@redhat.com>
src/util/virhostdev.c
src/util/virhostdev.h

index 86ca8e0473fa52370bc943fc7d58cf3228354478..c424a970f7ab3f2d1bff4ce7e4734fdb850cca4b 100644 (file)
@@ -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;
         }
 
index 4ce5c4de547ab944a620d73a865f256879d8e36d..76039bb60024ab7c63bd96bcf1a1371ce02a29b6 100644 (file)
@@ -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,