diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-09-22 16:21:33 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-09-22 16:21:33 +0000 |
commit | a64a0fba9e2c0404ddfd4287f37f5c0a1be565e2 (patch) | |
tree | f3d5836b8f295070afdf605e7148ff3afecad398 /sys/arch/aviion | |
parent | ff4c44726bfd6e9c1fe5b09d86ca20e850023414 (diff) |
M_ZERO -> bzero.
ok art@
Diffstat (limited to 'sys/arch/aviion')
-rw-r--r-- | sys/arch/aviion/aviion/mem.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sys/arch/aviion/aviion/mem.c b/sys/arch/aviion/aviion/mem.c index 3440e06a780..d0181c9793a 100644 --- a/sys/arch/aviion/aviion/mem.c +++ b/sys/arch/aviion/aviion/mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mem.c,v 1.1 2006/04/18 12:42:03 miod Exp $ */ +/* $OpenBSD: mem.c,v 1.2 2007/09/22 16:21:32 krw Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -154,12 +154,9 @@ mmrw(dev, uio, flags) * and EFAULT for writes. */ if (uio->uio_rw == UIO_READ) { - if (zeropage == NULL) { - zeropage = (caddr_t) - malloc(PAGE_SIZE, M_TEMP, - M_WAITOK); - bzero(zeropage, PAGE_SIZE); - } + if (zeropage == NULL) + zeropage = malloc(PAGE_SIZE, + M_TEMP, M_WAITOK | M_ZERO); c = min(c, NBPG - (int)v); v = (vaddr_t)zeropage; } else @@ -183,11 +180,9 @@ mmrw(dev, uio, flags) c = iov->iov_len; break; } - if (zeropage == NULL) { - zeropage = (caddr_t) - malloc(PAGE_SIZE, M_TEMP, M_WAITOK); - bzero(zeropage, 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); continue; |