summaryrefslogtreecommitdiff
path: root/sys/arch/arm
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-10-06 23:50:56 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-10-06 23:50:56 +0000
commitf5461d41b129fefc48ff4c9ded82554394de9bf0 (patch)
tree86f9d97cdbd7712121debe572c568e72070e2559 /sys/arch/arm
parentfd70724e0c6df0ffd868e0c7d80b8f683072b49a (diff)
Simpliest memset(,0,) -> M_ZERO changes. One (caddr *) cast removal,
otherwise just adding M_ZERO to malloc() and removing the immediately adjacent memset(,0,).
Diffstat (limited to 'sys/arch/arm')
-rw-r--r--sys/arch/arm/arm/mem.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/arch/arm/arm/mem.c b/sys/arch/arm/arm/mem.c
index 8375052531f..bcf8367e212 100644
--- a/sys/arch/arm/arm/mem.c
+++ b/sys/arch/arm/arm/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.6 2006/11/29 13:28:45 miod Exp $ */
+/* $OpenBSD: mem.c,v 1.7 2007/10/06 23:50:54 krw Exp $ */
/* $NetBSD: mem.c,v 1.11 2003/10/16 12:02:58 jdolecek Exp $ */
/*
@@ -215,11 +215,9 @@ mmrw(dev, uio, flags)
uio->uio_resid = 0;
return (0);
}
- if (zeropage == NULL) {
- zeropage = (caddr_t)
- malloc(PAGE_SIZE, M_TEMP, M_WAITOK);
- memset(zeropage, 0, PAGE_SIZE);
- }
+ if (zeropage == NULL)
+ zeropage = malloc(PAGE_SIZE, M_TEMP,
+ M_WAITOK | M_ZERO);
c = min(iov->iov_len, PAGE_SIZE);
error = uiomove(zeropage, c, uio);
break;