summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/oosiop.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2007-10-01 04:03:51 +0000
committerkrw <krw@openbsd.org>2007-10-01 04:03:51 +0000
commit7a2a96ec5882ec9d02cf94e89cb064da330467f0 (patch)
treefce950c792b23a45ea8ae1e2621284666db3db8c /sys/dev/ic/oosiop.c
parentSpacing. (diff)
downloadwireguard-openbsd-7a2a96ec5882ec9d02cf94e89cb064da330467f0.tar.xz
wireguard-openbsd-7a2a96ec5882ec9d02cf94e89cb064da330467f0.zip
More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...'.
Diffstat (limited to 'sys/dev/ic/oosiop.c')
-rw-r--r--sys/dev/ic/oosiop.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c
index 4c6928e17cc..9b400aa49c3 100644
--- a/sys/dev/ic/oosiop.c
+++ b/sys/dev/ic/oosiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oosiop.c,v 1.5 2006/11/28 23:59:45 dlg Exp $ */
+/* $OpenBSD: oosiop.c,v 1.6 2007/10/01 04:03:51 krw Exp $ */
/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
/*
@@ -270,12 +270,11 @@ oosiop_alloc_cb(struct oosiop_softc *sc, int ncb)
/*
* Allocate oosiop_cb.
*/
- cb = malloc(sizeof(struct oosiop_cb) * ncb, M_DEVBUF, M_NOWAIT);
+ cb = malloc(sizeof(*cb) * ncb, M_DEVBUF, M_NOWAIT | M_ZERO);
if (cb == NULL) {
printf(": failed to allocate cb memory\n");
return (ENOMEM);
}
- bzero(cb, sizeof(struct oosiop_cb) * ncb);
/*
* Allocate DMA-safe memory for the oosiop_xfer and map it.