diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2020-08-27 19:34:38 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2020-08-27 19:34:38 +0000 |
commit | da996869d46004ebc8312a0f1e6790744f65a08e (patch) | |
tree | f6cc2e8f7e8084b6a79c252c825e3beb591d198b /sys | |
parent | 9d82481c587f3bec98fb94de0070e54a040a38d0 (diff) |
usbd_get_cdesc() returns usb_config_descriptor_t *. Therefore return
'NULL' instead of '0'.
ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/usb_subr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 3eb10ae4d16..231be7676cd 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_subr.c,v 1.151 2020/07/31 10:49:33 mglocker Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.152 2020/08/27 19:34:37 mglocker Exp $ */ /* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -1381,7 +1381,7 @@ usbd_get_cdesc(struct usbd_device *dev, int index, u_int *lenp) err = usbd_get_desc(dev, UDESC_CONFIG, index, USB_CONFIG_DESCRIPTOR_SIZE, &cdescr); if (err || cdescr.bDescriptorType != UDESC_CONFIG) - return (0); + return (NULL); len = UGETW(cdescr.wTotalLength); DPRINTFN(5,("%s: index=%d, len=%u\n", __func__, index, len)); if (lenp) @@ -1390,7 +1390,7 @@ usbd_get_cdesc(struct usbd_device *dev, int index, u_int *lenp) err = usbd_get_desc(dev, UDESC_CONFIG, index, len, cdesc); if (err) { free(cdesc, M_TEMP, len); - return (0); + return (NULL); } } return (cdesc); |