diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-10 11:31:50 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-10 11:31:50 +0000 |
commit | eae51991a541a6e1a2e0974aaeb7df533204e03a (patch) | |
tree | e00ab9b51ccb808bfdf2dc6e4727c3ac2c7c0e88 /sys/arch/sparc64/dev/pyro.c | |
parent | d58e96b237e722b2df95155b0a86461ce738354b (diff) |
malloc+bzero -> malloc+M_ZERO. Use 'malloc(sizeof(*p) ...' idiom.
This completes my bzero/memset(,0,) -> M_ZERO sweep of the tree.
ok kettenis@
Diffstat (limited to 'sys/arch/sparc64/dev/pyro.c')
-rw-r--r-- | sys/arch/sparc64/dev/pyro.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/arch/sparc64/dev/pyro.c b/sys/arch/sparc64/dev/pyro.c index 79ac9830a6b..ab2ba3e577d 100644 --- a/sys/arch/sparc64/dev/pyro.c +++ b/sys/arch/sparc64/dev/pyro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pyro.c,v 1.9 2007/10/08 18:30:13 krw Exp $ */ +/* $OpenBSD: pyro.c,v 1.10 2007/10/10 11:31:49 krw Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -322,12 +322,10 @@ pyro_alloc_dma_tag(struct pyro_pbm *pbm) struct pyro_softc *sc = pbm->pp_sc; bus_dma_tag_t dt, pdt = sc->sc_dmat; - dt = (bus_dma_tag_t)malloc(sizeof(struct sparc_bus_dma_tag), - M_DEVBUF, M_NOWAIT); + dt = malloc(sizeof(*dt), M_DEVBUF, M_NOWAIT | M_ZERO); if (dt == NULL) panic("pyro: could not alloc dma tag"); - bzero(dt, sizeof(*dt)); dt->_cookie = pbm; dt->_parent = pdt; dt->_dmamap_create = pyro_dmamap_create; |