summaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_subr.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-06 23:50:56 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-06 23:50:56 +0000
commitf5461d41b129fefc48ff4c9ded82554394de9bf0 (patch)
tree86f9d97cdbd7712121debe572c568e72070e2559 /sys/dev/usb/usb_subr.c
parentfd70724e0c6df0ffd868e0c7d80b8f683072b49a (diff)
Simpliest memset(,0,) -> M_ZERO changes. One (caddr *) cast removal,
otherwise just adding M_ZERO to malloc() and removing the immediately adjacent memset(,0,).
Diffstat (limited to 'sys/dev/usb/usb_subr.c')
-rw-r--r--sys/dev/usb/usb_subr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index c3dacfe467e..c30b6b5c70b 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.60 2007/09/11 13:39:34 gilles Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.61 2007/10/06 23:50:55 krw 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 $ */
@@ -976,10 +976,9 @@ usbd_new_device(struct device *parent, usbd_bus_handle bus, int depth,
return (USBD_NO_ADDR);
}
- dev = malloc(sizeof *dev, M_USB, M_NOWAIT);
+ dev = malloc(sizeof *dev, M_USB, M_NOWAIT | M_ZERO);
if (dev == NULL)
return (USBD_NOMEM);
- memset(dev, 0, sizeof *dev);
dev->bus = bus;