diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-08 17:48:07 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-10-08 17:48:07 +0000 |
commit | fc2353b74733ab682dfac772af7f48100285828e (patch) | |
tree | b8de9934919b3897a2968c996ece15b14aa7824d /sys/arch/sparc64 | |
parent | d8fb009b456a8195efa5e4a53a0c2b7ce816b7f6 (diff) |
A few trailing bzero/memset -> M_ZERO occurrences, cast removal and
size(*p) usage.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/dev/sbus.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/machdep.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/sys/arch/sparc64/dev/sbus.c b/sys/arch/sparc64/dev/sbus.c index 242fa0be227..4477553d62b 100644 --- a/sys/arch/sparc64/dev/sbus.c +++ b/sys/arch/sparc64/dev/sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbus.c,v 1.28 2007/09/17 01:33:33 krw Exp $ */ +/* $OpenBSD: sbus.c,v 1.29 2007/10/08 17:48:06 krw Exp $ */ /* $NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp $ */ /*- @@ -356,11 +356,9 @@ sbus_mb_attach(struct device *parent, struct device *self, void *aux) iommu_init(name, &sc->sc_is, 0, -1); /* Enable the over temp intr */ - ih = (struct intrhand *) - malloc(sizeof(struct intrhand), M_DEVBUF, M_NOWAIT); + ih = malloc(sizeof(*ih), M_DEVBUF, M_NOWAIT | M_ZERO); if (ih == NULL) panic("couldn't malloc intrhand"); - memset(ih, 0, sizeof(struct intrhand)); ih->ih_map = &sysio->therm_int_map; ih->ih_clr = NULL; /* &sysio->therm_clr_int; */ ih->ih_fun = sbus_overtemp; diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c index 5613eeb8e32..8885cc1ad7b 100644 --- a/sys/arch/sparc64/sparc64/machdep.c +++ b/sys/arch/sparc64/sparc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.97 2007/10/02 00:59:12 krw Exp $ */ +/* $OpenBSD: machdep.c,v 1.98 2007/10/08 17:48:06 krw Exp $ */ /* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */ /*- @@ -1809,12 +1809,10 @@ bus_intr_allocate(bus_space_tag_t t, int (*handler)(void *), void *arg, { struct intrhand *ih; - ih = (struct intrhand *)malloc(sizeof(struct intrhand), M_DEVBUF, M_NOWAIT); + ih = malloc(sizeof(*ih), M_DEVBUF, M_NOWAIT | M_ZERO); if (ih == NULL) return (NULL); - memset(ih, 0, sizeof(struct intrhand)); - ih->ih_fun = handler; ih->ih_arg = arg; ih->ih_number = number; |