summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-04-09 20:36:07 +0000
committerpfg <pfg@FreeBSD.org>2016-04-09 20:36:07 +0000
commitaa42ac0ef56e414b8acc167fa71c786c75af2a2c (patch)
treea64fc1c28ce33890150327ef2cfc4c0ca17f72b3 /sys/dev/usb
parent6dcdb61ae36b64cef3125daa63d6dc75f5bcdadd (diff)
downloadFreeBSD-src-aa42ac0ef56e414b8acc167fa71c786c75af2a2c.zip
FreeBSD-src-aa42ac0ef56e414b8acc167fa71c786c75af2a2c.tar.gz
USB: replace 0 with NULL for pointers.
Found with devel/coccinelle. Reviewed by: hselasky
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/net/if_urndis.c2
-rw-r--r--sys/dev/usb/usb_transfer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/net/if_urndis.c b/sys/dev/usb/net/if_urndis.c
index 749f874..de7fd1e 100644
--- a/sys/dev/usb/net/if_urndis.c
+++ b/sys/dev/usb/net/if_urndis.c
@@ -235,7 +235,7 @@ urndis_attach(device_t dev)
cmd = usbd_find_descriptor(uaa->device, NULL, uaa->info.bIfaceIndex,
UDESC_CS_INTERFACE, 0xFF, UDESCSUB_CDC_CM, 0xFF);
- if (cmd != 0) {
+ if (cmd != NULL) {
DPRINTF("Call Mode Descriptor found, dataif=%d\n", cmd->bDataInterface);
iface_index[0] = cmd->bDataInterface;
}
diff --git a/sys/dev/usb/usb_transfer.c b/sys/dev/usb/usb_transfer.c
index 783a96c..17b9367 100644
--- a/sys/dev/usb/usb_transfer.c
+++ b/sys/dev/usb/usb_transfer.c
@@ -925,7 +925,7 @@ usbd_transfer_setup(struct usb_device *udev,
DPRINTFN(6, "setup array has zero length!\n");
return (USB_ERR_INVAL);
}
- if (ifaces == 0) {
+ if (ifaces == NULL) {
DPRINTFN(6, "ifaces array is NULL!\n");
return (USB_ERR_INVAL);
}
OpenPOWER on IntegriCloud