diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-01 16:39:31 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-01 16:39:31 +0000 |
commit | 5a93b7b14326715c9e05692f21723cbd2531f8ee (patch) | |
tree | 2679daadf708c6a77ae4f6ff29b583db5965079f /sys/netbt/hci_event.c | |
parent | 1d3a2c7615ad6b5663e200fe3e8a475ef3203245 (diff) |
Last of the really easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...'
where obvious.
Diffstat (limited to 'sys/netbt/hci_event.c')
-rw-r--r-- | sys/netbt/hci_event.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netbt/hci_event.c b/sys/netbt/hci_event.c index 91973c9e515..b4be8a5aff4 100644 --- a/sys/netbt/hci_event.c +++ b/sys/netbt/hci_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hci_event.c,v 1.5 2007/06/19 08:12:35 uwe Exp $ */ +/* $OpenBSD: hci_event.c,v 1.6 2007/10/01 16:39:30 krw Exp $ */ /* $NetBSD: hci_event.c,v 1.6 2007/04/21 06:15:23 plunky Exp $ */ /*- @@ -434,13 +434,12 @@ hci_event_inquiry_result(struct hci_unit *unit, struct mbuf *m) memo = hci_memo_find(unit, &bdaddr); if (memo == NULL) { - memo = malloc(sizeof(struct hci_memo), - M_BLUETOOTH, M_NOWAIT); + memo = malloc(sizeof(*memo), M_BLUETOOTH, + M_NOWAIT | M_ZERO); if (memo == NULL) { DPRINTFN(0, "out of memo memory!\n"); break; } - bzero(memo, sizeof *memo); LIST_INSERT_HEAD(&unit->hci_memos, memo, next); } |