summaryrefslogtreecommitdiff
path: root/sys/netbt/l2cap_upper.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-01 16:39:31 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-01 16:39:31 +0000
commit5a93b7b14326715c9e05692f21723cbd2531f8ee (patch)
tree2679daadf708c6a77ae4f6ff29b583db5965079f /sys/netbt/l2cap_upper.c
parent1d3a2c7615ad6b5663e200fe3e8a475ef3203245 (diff)
Last of the really easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...'
where obvious.
Diffstat (limited to 'sys/netbt/l2cap_upper.c')
-rw-r--r--sys/netbt/l2cap_upper.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netbt/l2cap_upper.c b/sys/netbt/l2cap_upper.c
index b33d51815f9..d3236a95a99 100644
--- a/sys/netbt/l2cap_upper.c
+++ b/sys/netbt/l2cap_upper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: l2cap_upper.c,v 1.1 2007/06/01 02:46:11 uwe Exp $ */
+/* $OpenBSD: l2cap_upper.c,v 1.2 2007/10/01 16:39:30 krw Exp $ */
/* $NetBSD: l2cap_upper.c,v 1.8 2007/04/29 20:23:36 msaitoh Exp $ */
/*-
@@ -67,11 +67,9 @@ l2cap_attach(struct l2cap_channel **handle,
KASSERT(proto != NULL);
KASSERT(upper != NULL);
- chan = malloc(sizeof(struct l2cap_channel), M_BLUETOOTH,
- M_NOWAIT);
+ chan = malloc(sizeof(*chan), M_BLUETOOTH, M_NOWAIT | M_ZERO);
if (chan == NULL)
return ENOMEM;
- bzero(chan, sizeof *chan);
chan->lc_proto = proto;
chan->lc_upper = upper;