summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-03 10:52:12 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-03 10:52:12 +0000
commit91e049d131acb98a8b3ff54ab8f882b27b354479 (patch)
tree2ccb5b9450d014d6731c31bc458bcc57a8a15916 /sys/arch
parenta2f23a0f4539991c8472613441751eead15267e9 (diff)
MALLOC+bzero -> malloc+M_ZERO.
In ip_esp.c all allocated memory is now zero'd in the "malloc(sizeof(*tc) + alen ..." case. The +alen memory was not initialized by the bzero() call. Noticed by chl@. "Looks good" art@ "seems ok" chl@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mvme68k/dev/vs.c5
-rw-r--r--sys/arch/mvme88k/dev/vs.c5
-rw-r--r--sys/arch/zaurus/dev/zaurus_flash.c6
3 files changed, 6 insertions, 10 deletions
diff --git a/sys/arch/mvme68k/dev/vs.c b/sys/arch/mvme68k/dev/vs.c
index 88bb063b231..e61f6050f74 100644
--- a/sys/arch/mvme68k/dev/vs.c
+++ b/sys/arch/mvme68k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.20 2006/06/02 18:53:56 miod Exp $ */
+/* $OpenBSD: vs.c,v 1.21 2007/10/03 10:52:11 krw Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -822,8 +822,7 @@ vs_alloc_scatter_gather()
{
M328_SG sg;
- MALLOC(sg, M328_SG, sizeof(struct m328_sg), M_DEVBUF, M_WAITOK);
- bzero(sg, sizeof(struct m328_sg));
+ sg = malloc(sizeof(struct m328_sg), M_DEVBUF, M_WAITOK | M_ZERO);
return (sg);
}
diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c
index 55ad50a0305..16b32a16720 100644
--- a/sys/arch/mvme88k/dev/vs.c
+++ b/sys/arch/mvme88k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.64 2006/12/01 19:36:09 miod Exp $ */
+/* $OpenBSD: vs.c,v 1.65 2007/10/03 10:52:11 krw Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
@@ -958,8 +958,7 @@ vs_alloc_scatter_gather(void)
{
M328_SG sg;
- MALLOC(sg, M328_SG, sizeof(struct m328_sg), M_DEVBUF, M_WAITOK);
- bzero(sg, sizeof(struct m328_sg));
+ sg = malloc(sizeof(struct m328_sg), M_DEVBUF, M_WAITOK | M_ZERO);
return (sg);
}
diff --git a/sys/arch/zaurus/dev/zaurus_flash.c b/sys/arch/zaurus/dev/zaurus_flash.c
index 5f2af195799..0568ad4b720 100644
--- a/sys/arch/zaurus/dev/zaurus_flash.c
+++ b/sys/arch/zaurus/dev/zaurus_flash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_flash.c,v 1.4 2007/06/20 18:15:46 deraadt Exp $ */
+/* $OpenBSD: zaurus_flash.c,v 1.5 2007/10/03 10:52:11 krw Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
@@ -622,12 +622,10 @@ zflash_safe_start(struct zflash_softc *sc, dev_t dev)
if (DL_GETPOFFSET(&lp->d_partitions[part]) % blksect)
return EIO;
- MALLOC(sp, struct zflash_safe *, sizeof(struct zflash_safe),
- M_DEVBUF, M_NOWAIT);
+ sp = malloc(sizeof(*sp), M_DEVBUF, M_NOWAIT | M_ZERO);
if (sp == NULL)
return ENOMEM;
- bzero(sp, sizeof(struct zflash_safe));
sp->sp_dev = dev;
sp->sp_pblks = DL_GETPSIZE(&lp->d_partitions[part]) / blksect;