diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-06-09 20:08:00 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-06-09 20:08:00 +0000 |
commit | b9e2974d0a2d4e8779ad73763cc9f4236fc09512 (patch) | |
tree | 6fc8cb1fee3dc48d2a4f23a4ed176fee0107c20d | |
parent | 50fceffbaa89a63808f3d48011469346773dfd15 (diff) |
correct loop in debug code to not use an uninitialised page. it was
ass-backwards.
afaik this was found by the LLVM CLang static analyser.
ok ariane@ a couple of days ago.
-rw-r--r-- | sys/uvm/uvm_map.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 70e60fd2b56..ed2484a4555 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.113 2009/06/06 17:46:44 art Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.114 2009/06/09 20:07:59 oga Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -3834,10 +3834,8 @@ static const char page_flagbits[] = "\31PMAP1\32PMAP2\33PMAP3"; void -uvm_page_printit(pg, full, pr) - struct vm_page *pg; - boolean_t full; - int (*pr)(const char *, ...); +uvm_page_printit(struct vm_page *pg, boolean_t full, + int (*pr)(const char *, ...)) { struct vm_page *tpg; struct uvm_object *uobj; @@ -3874,7 +3872,7 @@ uvm_page_printit(pg, full, pr) uobj = pg->uobject; if (uobj) { (*pr)(" checking object list\n"); - RB_FOREACH(pg, uobj_pgs, &uobj->memt) { + RB_FOREACH(tpg, uobj_pgs, &uobj->memt) { if (tpg == pg) { break; } |