summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriane van der Steldt <ariane@cvs.openbsd.org>2011-04-05 22:33:52 +0000
committerAriane van der Steldt <ariane@cvs.openbsd.org>2011-04-05 22:33:52 +0000
commit60d59954313537cec62210a414866c9d36a63daf (patch)
tree234eb335f5efa39421e817d6eb445ff9d0821083
parent3f73c7fc1913294df1f78787381d55b0224fd0df (diff)
Test iterated variable instead of a temporary variable from the previous
code block (not 'high_next' but 'low'). While here, change the KASSERT to a KDASSERT. Pointed out by Amit Kulkarni. ok thib@, miod@
-rw-r--r--sys/uvm/uvm_pmemrange.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/uvm/uvm_pmemrange.c b/sys/uvm/uvm_pmemrange.c
index 0b1c8582d52..69f9cf1b11f 100644
--- a/sys/uvm/uvm_pmemrange.c
+++ b/sys/uvm/uvm_pmemrange.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvm_pmemrange.c,v 1.20 2011/04/04 22:58:48 ariane Exp $ */
+/* $OpenBSD: uvm_pmemrange.c,v 1.21 2011/04/05 22:33:51 ariane Exp $ */
/*
* Copyright (c) 2009, 2010 Ariane van der Steldt <ariane@stack.nl>
@@ -1630,8 +1630,8 @@ uvm_pmr_rootupdate(struct uvm_pmemrange *pmr, struct vm_page *init_root,
for (low = RB_NEXT(uvm_pmr_addr, &pmr->addr, low);
low != high;
low = RB_NEXT(uvm_pmr_addr, &pmr->addr, low)) {
- KASSERT(PMR_IS_SUBRANGE_OF(atop(VM_PAGE_TO_PHYS(high_next)),
- atop(VM_PAGE_TO_PHYS(high_next)) + high_next->fpgsz,
+ KDASSERT(PMR_IS_SUBRANGE_OF(atop(VM_PAGE_TO_PHYS(low)),
+ atop(VM_PAGE_TO_PHYS(low)) + low->fpgsz,
start, end));
if (uvm_pmr_pg_to_memtype(low) == memtype)
return low;