diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-01 16:11:20 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-01 16:11:20 +0000 |
commit | 1d3a2c7615ad6b5663e200fe3e8a475ef3203245 (patch) | |
tree | de1c38fdba408d50ca09e62ce6c6e40d21d28491 /sys/arch/sparc/dev/xd.c | |
parent | a730dedabc875f93e81898068b1cccdb9e45cb7c (diff) |
More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...' where
obvious.
Diffstat (limited to 'sys/arch/sparc/dev/xd.c')
-rw-r--r-- | sys/arch/sparc/dev/xd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index 1010d16b291..b33335693b3 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xd.c,v 1.41 2007/07/01 19:06:57 miod Exp $ */ +/* $OpenBSD: xd.c,v 1.42 2007/10/01 16:11:19 krw Exp $ */ /* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */ /* @@ -427,11 +427,10 @@ xdcattach(parent, self, aux) /* Setup device view of DVMA address */ xdc->dvmaiopb = (struct xd_iopb *) ((u_long) xdc->iopbase - DVMA_BASE); - xdc->reqs = (struct xd_iorq *) - malloc(XDC_MAXIOPB * sizeof(struct xd_iorq), M_DEVBUF, M_NOWAIT); + xdc->reqs = malloc(XDC_MAXIOPB * sizeof(struct xd_iorq), M_DEVBUF, + M_NOWAIT | M_ZERO); if (xdc->reqs == NULL) panic("xdc malloc"); - bzero(xdc->reqs, XDC_MAXIOPB * sizeof(struct xd_iorq)); /* init free list, iorq to iopb pointers, and non-zero fields in the * iopb which never change. */ |