Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ext2fs use the correct size when zeroing an array.
details: https://anonhg.NetBSD.org/src/rev/8499543292c8
branches: trunk
changeset: 526542:8499543292c8
user: chs <chs%NetBSD.org@localhost>
date: Sun May 05 17:01:41 2002 +0000
description:
use the correct size when zeroing an array.
diffstat:
sys/ufs/ext2fs/ext2fs_balloc.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 9ecc94daebba -r 8499543292c8 sys/ufs/ext2fs/ext2fs_balloc.c
--- a/sys/ufs/ext2fs/ext2fs_balloc.c Sun May 05 17:00:06 2002 +0000
+++ b/sys/ufs/ext2fs/ext2fs_balloc.c Sun May 05 17:01:41 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_balloc.c,v 1.16 2002/01/26 08:32:06 chs Exp $ */
+/* $NetBSD: ext2fs_balloc.c,v 1.17 2002/05/05 17:01:41 chs Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_balloc.c,v 1.16 2002/01/26 08:32:06 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_balloc.c,v 1.17 2002/05/05 17:01:41 chs Exp $");
#if defined(_KERNEL_OPT)
#include "opt_uvmhist.h"
@@ -408,12 +408,11 @@
pagestart = trunc_page(off) & ~(bsize - 1);
npages = MIN(ppb, (round_page(eof) - pagestart) >> PAGE_SHIFT);
- memset(pgs, 0, npages);
+ memset(pgs, 0, npages * sizeof(struct vm_page *));
simple_lock(&vp->v_interlock);
error = VOP_GETPAGES(vp, pagestart, pgs, &npages, 0,
VM_PROT_READ, 0, PGO_SYNCIO | PGO_PASTEOF);
if (error) {
- UVMHIST_LOG(ubchist, "getpages %d", error,0,0,0);
return error;
}
for (i = 0; i < npages; i++) {
Home |
Main Index |
Thread Index |
Old Index