diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-09-18 00:46:42 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-09-18 00:46:42 +0000 |
commit | 29ae8cddb2ec660dd7311cb7bbaea7a920b82c67 (patch) | |
tree | 4ca17d15dfa75e34bbfa385be5ade7039b0e906e /sys/arch | |
parent | 431db9b83f301f2bf82d88ed2b75bb958f457964 (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')
-rw-r--r-- | sys/arch/sparc64/dev/ebus.c | 5 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/pyro.c | 5 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/schizo.c | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/sys/arch/sparc64/dev/ebus.c b/sys/arch/sparc64/dev/ebus.c index 2ce0e709bc9..8ffae5cb851 100644 --- a/sys/arch/sparc64/dev/ebus.c +++ b/sys/arch/sparc64/dev/ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ebus.c,v 1.17 2007/04/10 17:47:55 miod Exp $ */ +/* $OpenBSD: ebus.c,v 1.18 2007/09/18 00:46:41 krw Exp $ */ /* $NetBSD: ebus.c,v 1.24 2001/07/25 03:49:54 eeh Exp $ */ /* @@ -373,11 +373,10 @@ _ebus_alloc_bus_tag(struct ebus_softc *sc, const char *name, { struct sparc_bus_space_tag *bt; - bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT); + bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT | M_ZERO); if (bt == NULL) panic("could not allocate ebus bus tag"); - bzero(bt, sizeof *bt); snprintf(bt->name, sizeof(bt->name), "%s_%s", sc->sc_dev.dv_xname, name); bt->cookie = sc; diff --git a/sys/arch/sparc64/dev/pyro.c b/sys/arch/sparc64/dev/pyro.c index 1f1585266f9..d69f9604c9d 100644 --- a/sys/arch/sparc64/dev/pyro.c +++ b/sys/arch/sparc64/dev/pyro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pyro.c,v 1.7 2007/04/03 19:59:01 kettenis Exp $ */ +/* $OpenBSD: pyro.c,v 1.8 2007/09/18 00:46:41 krw Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -299,11 +299,10 @@ _pyro_alloc_bus_tag(struct pyro_pbm *pbm, const char *name, int ss, struct pyro_softc *sc = pbm->pp_sc; struct sparc_bus_space_tag *bt; - bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT); + bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT | M_ZERO); if (bt == NULL) panic("pyro: could not allocate bus tag"); - bzero(bt, sizeof *bt); snprintf(bt->name, sizeof(bt->name), "%s-pbm_%s(%d/%2.2x)", sc->sc_dv.dv_xname, name, ss, asi); diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c index 28546179308..998121d2d92 100644 --- a/sys/arch/sparc64/dev/schizo.c +++ b/sys/arch/sparc64/dev/schizo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: schizo.c,v 1.48 2007/08/25 19:25:31 kettenis Exp $ */ +/* $OpenBSD: schizo.c,v 1.49 2007/09/18 00:46:41 krw Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -533,11 +533,10 @@ schizo_alloc_bus_tag(struct schizo_pbm *pbm, const char *name, int ss, struct schizo_softc *sc = pbm->sp_sc; struct sparc_bus_space_tag *bt; - bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT); + bt = malloc(sizeof(*bt), M_DEVBUF, M_NOWAIT | M_ZERO); if (bt == NULL) panic("schizo: could not allocate bus tag"); - bzero(bt, sizeof *bt); snprintf(bt->name, sizeof(bt->name), "%s-pbm_%s(%d/%2.2x)", sc->sc_dv.dv_xname, name, ss, asi); |