diff options
author | 2015-06-30 08:40:55 +0000 | |
---|---|---|
committer | 2015-06-30 08:40:55 +0000 | |
commit | 8e3cc04bbb7c480e882e9c95f94ffe1bc98e41dd (patch) | |
tree | bde543eaf552a4e7a92104dfa89edccf353a39c0 | |
parent | Add a small paragraph about some difference with Lua implementation. (diff) | |
download | wireguard-openbsd-8e3cc04bbb7c480e882e9c95f94ffe1bc98e41dd.tar.xz wireguard-openbsd-8e3cc04bbb7c480e882e9c95f94ffe1bc98e41dd.zip |
Clean up a needless check in an if statement.
ok kettenis@
-rw-r--r-- | sys/arch/amd64/amd64/pmap.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c index f8f8eae6750..2b35042d5e5 100644 --- a/sys/arch/amd64/amd64/pmap.c +++ b/sys/arch/amd64/amd64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.92 2015/04/30 15:49:02 mlarkin Exp $ */ +/* $OpenBSD: pmap.c,v 1.93 2015/06/30 08:40:55 mlarkin Exp $ */ /* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */ /* @@ -811,14 +811,11 @@ pmap_find_ptp(struct pmap *pmap, vaddr_t va, paddr_t pa, int level) struct vm_page *pg; if (pa != (paddr_t)-1 && pmap->pm_ptphint[lidx] && - pa == VM_PAGE_TO_PHYS(pmap->pm_ptphint[lidx])) { + pa == VM_PAGE_TO_PHYS(pmap->pm_ptphint[lidx])) return (pmap->pm_ptphint[lidx]); - } - if (lidx == 0) - pg = uvm_pagelookup(&pmap->pm_obj[lidx], ptp_va2o(va, level)); - else { - pg = uvm_pagelookup(&pmap->pm_obj[lidx], ptp_va2o(va, level)); - } + + pg = uvm_pagelookup(&pmap->pm_obj[lidx], ptp_va2o(va, level)); + return pg; } |