diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-09-17 01:33:34 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-09-17 01:33:34 +0000 |
commit | a854e6884a9635329a1490f5cf8420c8ab6f8f85 (patch) | |
tree | 29bd971e80c3ea6bf34f989e494141dcc2c006cb /sys/netbt | |
parent | 1dd97578d5974d04f8b171b17c36e35635acd61b (diff) |
Only the most obvious bzero() -> M_ZERO changes. No cast changes, no
MALLOC/FREE, etc. Just adding M_ZERO to malloc() and deleting an
immediately adjacent bzero().
Diffstat (limited to 'sys/netbt')
-rw-r--r-- | sys/netbt/hci_link.c | 5 | ||||
-rw-r--r-- | sys/netbt/hci_socket.c | 5 | ||||
-rw-r--r-- | sys/netbt/rfcomm_session.c | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/netbt/hci_link.c b/sys/netbt/hci_link.c index 0de5ec40a60..65efaf2f120 100644 --- a/sys/netbt/hci_link.c +++ b/sys/netbt/hci_link.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hci_link.c,v 1.5 2007/07/22 21:05:00 gwk Exp $ */ +/* $OpenBSD: hci_link.c,v 1.6 2007/09/17 01:33:33 krw Exp $ */ /* $NetBSD: hci_link.c,v 1.11 2007/04/21 06:15:23 plunky Exp $ */ /*- @@ -888,10 +888,9 @@ hci_link_alloc(struct hci_unit *unit) KASSERT(unit != NULL); - link = malloc(sizeof *link, M_BLUETOOTH, M_NOWAIT); + link = malloc(sizeof *link, M_BLUETOOTH, M_NOWAIT | M_ZERO); if (link == NULL) return NULL; - bzero(link, sizeof *link); link->hl_unit = unit; link->hl_state = HCI_LINK_CLOSED; diff --git a/sys/netbt/hci_socket.c b/sys/netbt/hci_socket.c index 1d55814ad22..4933e461aa0 100644 --- a/sys/netbt/hci_socket.c +++ b/sys/netbt/hci_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hci_socket.c,v 1.3 2007/06/02 01:46:01 uwe Exp $ */ +/* $OpenBSD: hci_socket.c,v 1.4 2007/09/17 01:33:33 krw Exp $ */ /* $NetBSD: hci_socket.c,v 1.10 2007/03/31 18:17:13 plunky Exp $ */ /*- @@ -350,10 +350,9 @@ hci_usrreq(struct socket *up, int req, struct mbuf *m, if (err) return err; - pcb = malloc(sizeof *pcb, M_PCB, M_NOWAIT); + pcb = malloc(sizeof *pcb, M_PCB, M_NOWAIT | M_ZERO); if (pcb == NULL) return ENOMEM; - bzero(pcb, sizeof *pcb); up->so_pcb = pcb; pcb->hp_socket = up; diff --git a/sys/netbt/rfcomm_session.c b/sys/netbt/rfcomm_session.c index f1d88643f54..0852c9f0996 100644 --- a/sys/netbt/rfcomm_session.c +++ b/sys/netbt/rfcomm_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rfcomm_session.c,v 1.1 2007/06/01 02:46:12 uwe Exp $ */ +/* $OpenBSD: rfcomm_session.c,v 1.2 2007/09/17 01:33:33 krw Exp $ */ /* $NetBSD: rfcomm_session.c,v 1.9 2007/04/21 06:15:23 plunky Exp $ */ /*- @@ -174,10 +174,9 @@ rfcomm_session_alloc(struct rfcomm_session_list *list, struct rfcomm_session *rs; int err; - rs = malloc(sizeof(*rs), M_BLUETOOTH, M_NOWAIT); + rs = malloc(sizeof(*rs), M_BLUETOOTH, M_NOWAIT | M_ZERO); if (rs == NULL) return NULL; - bzero(rs, sizeof *rs); rs->rs_state = RFCOMM_SESSION_CLOSED; |