diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2000-10-29 15:47:16 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2000-10-29 15:47:16 +0000 |
commit | 7d9d396fd545532b28c0dea8ef9f385b4fff4578 (patch) | |
tree | b0111113d7d91dcd25f09237023149e8ffd0f996 /sys/dev/ahb | |
parent | f8eaa3d8016b5b89b5f98f3e579e75ed926fc118 (diff) | |
download | FreeBSD-src-7d9d396fd545532b28c0dea8ef9f385b4fff4578.zip FreeBSD-src-7d9d396fd545532b28c0dea8ef9f385b4fff4578.tar.gz |
Add the use of M_ZERO to some malloc calls.
Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Approved by: gibbs
Diffstat (limited to 'sys/dev/ahb')
-rw-r--r-- | sys/dev/ahb/ahb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c index 9fc15a4..bbd6fd0 100644 --- a/sys/dev/ahb/ahb.c +++ b/sys/dev/ahb/ahb.c @@ -393,12 +393,11 @@ ahballoc(u_long unit, struct resource *res) /* * Allocate a storage area for us */ - ahb = malloc(sizeof(struct ahb_softc), M_DEVBUF, M_NOWAIT); + ahb = malloc(sizeof(struct ahb_softc), M_DEVBUF, M_NOWAIT | M_ZERO); if (!ahb) { printf("ahb%ld: cannot malloc!\n", unit); return (NULL); } - bzero(ahb, sizeof(struct ahb_softc)); SLIST_INIT(&ahb->free_ecbs); LIST_INIT(&ahb->pending_ccbs); ahb->unit = unit; |