summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-09-17 01:33:34 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-09-17 01:33:34 +0000
commita854e6884a9635329a1490f5cf8420c8ab6f8f85 (patch)
tree29bd971e80c3ea6bf34f989e494141dcc2c006cb /sys/arch/macppc
parent1dd97578d5974d04f8b171b17c36e35635acd61b (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/arch/macppc')
-rw-r--r--sys/arch/macppc/dev/awacs.c5
-rw-r--r--sys/arch/macppc/dev/dbdma.c5
-rw-r--r--sys/arch/macppc/dev/i2s.c5
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/arch/macppc/dev/awacs.c b/sys/arch/macppc/dev/awacs.c
index c7eafabb261..380b4a79e9e 100644
--- a/sys/arch/macppc/dev/awacs.c
+++ b/sys/arch/macppc/dev/awacs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: awacs.c,v 1.19 2007/04/22 22:31:14 deraadt Exp $ */
+/* $OpenBSD: awacs.c,v 1.20 2007/09/17 01:33:33 krw Exp $ */
/* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */
/*-
@@ -990,10 +990,9 @@ awacs_allocm(void *h, int dir, size_t size, int type, int flags)
if (size > AWACS_DMALIST_MAX * AWACS_DMASEG_MAX)
return (NULL);
- p = malloc(sizeof(*p), type, flags);
+ p = malloc(sizeof(*p), type, flags | M_ZERO);
if (!p)
return (NULL);
- bzero(p, sizeof(*p));
/* convert to the bus.h style, not used otherwise */
if (flags & M_NOWAIT)
diff --git a/sys/arch/macppc/dev/dbdma.c b/sys/arch/macppc/dev/dbdma.c
index d6622654072..904d4049a58 100644
--- a/sys/arch/macppc/dev/dbdma.c
+++ b/sys/arch/macppc/dev/dbdma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dbdma.c,v 1.8 2006/01/13 19:25:44 miod Exp $ */
+/* $OpenBSD: dbdma.c,v 1.9 2007/09/17 01:33:33 krw Exp $ */
/* $NetBSD: dbdma.c,v 1.2 1998/08/21 16:13:28 tsubai Exp $ */
/*
@@ -119,10 +119,9 @@ dbdma_alloc(bus_dma_tag_t dmat, int size)
dbdma_t dt;
int error;
- dt = malloc(sizeof *dt, M_DEVBUF, M_NOWAIT);
+ dt = malloc(sizeof *dt, M_DEVBUF, M_NOWAIT | M_ZERO);
if (!dt)
return (dt);
- bzero(dt, sizeof *dt);
dt->d_size = size *= sizeof(dbdma_command_t);
dt->d_dmat = dmat;
diff --git a/sys/arch/macppc/dev/i2s.c b/sys/arch/macppc/dev/i2s.c
index a4942db7abd..c82529f87fe 100644
--- a/sys/arch/macppc/dev/i2s.c
+++ b/sys/arch/macppc/dev/i2s.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2s.c,v 1.8 2007/04/22 22:31:14 deraadt Exp $ */
+/* $OpenBSD: i2s.c,v 1.9 2007/09/17 01:33:33 krw Exp $ */
/* $NetBSD: i2s.c,v 1.1 2003/12/27 02:19:34 grant Exp $ */
/*-
@@ -1188,10 +1188,9 @@ i2s_allocm(void *h, int dir, size_t size, int type, int flags)
if (size > I2S_DMALIST_MAX * I2S_DMASEG_MAX)
return (NULL);
- p = malloc(sizeof(*p), type, flags);
+ p = malloc(sizeof(*p), type, flags | M_ZERO);
if (!p)
return (NULL);
- bzero(p, sizeof(*p));
/* convert to the bus.h style, not used otherwise */
if (flags & M_NOWAIT)