summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-08 17:48:07 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-08 17:48:07 +0000
commitfc2353b74733ab682dfac772af7f48100285828e (patch)
treeb8de9934919b3897a2968c996ece15b14aa7824d /sys/arch/sparc/dev
parentd8fb009b456a8195efa5e4a53a0c2b7ce816b7f6 (diff)
A few trailing bzero/memset -> M_ZERO occurrences, cast removal and
size(*p) usage.
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/obio.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sys/arch/sparc/dev/obio.c b/sys/arch/sparc/dev/obio.c
index 6e1234d8dfc..7be6f191120 100644
--- a/sys/arch/sparc/dev/obio.c
+++ b/sys/arch/sparc/dev/obio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: obio.c,v 1.18 2007/07/01 19:07:45 miod Exp $ */
+/* $OpenBSD: obio.c,v 1.19 2007/10/08 17:48:06 krw Exp $ */
/* $NetBSD: obio.c,v 1.37 1997/07/29 09:58:11 fair Exp $ */
/*
@@ -297,11 +297,10 @@ vmesattach(parent, self, args)
printf("\n");
if (vmeints == NULL) {
- vmeints = (struct intrhand **)malloc(256 *
- sizeof(struct intrhand *), M_TEMP, M_NOWAIT);
+ vmeints = malloc(256 * sizeof(struct intrhand *), M_TEMP,
+ M_NOWAIT | M_ZERO);
if (vmeints == NULL)
panic("vmesattach: can't allocate intrhand");
- bzero(vmeints, 256 * sizeof(struct intrhand *));
}
(void)config_search(vmes_scan, self, args);
bus_untmp();
@@ -320,11 +319,10 @@ vmelattach(parent, self, args)
printf("\n");
if (vmeints == NULL) {
- vmeints = (struct intrhand **)malloc(256 *
- sizeof(struct intrhand *), M_TEMP, M_NOWAIT);
+ vmeints = malloc(256 * sizeof(struct intrhand *), M_TEMP,
+ M_NOWAIT | M_ZERO);
if (vmeints == NULL)
panic("vmelattach: can't allocate intrhand");
- bzero(vmeints, 256 * sizeof(struct intrhand *));
}
(void)config_search(vmel_scan, self, args);
bus_untmp();
@@ -628,11 +626,9 @@ vmeintr_establish(vec, level, ih, ipl_block, name)
if (ihs->ih_fun == vmeintr)
return;
- ihs = (struct intrhand *)malloc(sizeof(struct intrhand),
- M_TEMP, M_NOWAIT);
+ ihs = malloc(sizeof(*ihs), M_TEMP, M_NOWAIT | M_ZERO);
if (ihs == NULL)
panic("vme_addirq");
- bzero(ihs, sizeof *ihs);
ihs->ih_fun = vmeintr;
ihs->ih_arg = (void *)level;
intr_establish(level, ihs, ipl_block, NULL);