summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2012-06-03 13:28:41 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2012-06-03 13:28:41 +0000
commitac9f553aab41541c459ec2b8ce9e508714355536 (patch)
treeb3594f5739fd6b616de4286a645522309a653742
parent3ef04528026bfbe8fd69fc5349c12166d09396bb (diff)
Avoid the unlikely but possible use of an uninitialised variable.
ok kettenis@
-rw-r--r--sys/arch/hppa/hppa/pmap.c5
-rw-r--r--sys/arch/hppa64/hppa64/pmap.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c
index 068c78cd1e5..729a73f8a29 100644
--- a/sys/arch/hppa/hppa/pmap.c
+++ b/sys/arch/hppa/hppa/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.159 2012/06/01 16:03:59 jsing Exp $ */
+/* $OpenBSD: pmap.c,v 1.160 2012/06/03 13:28:40 jsing Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -772,7 +772,7 @@ pmap_enter(struct pmap *pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags)
volatile pt_entry_t *pde;
pt_entry_t pte;
struct vm_page *pg, *ptp = NULL;
- struct pv_entry *pve;
+ struct pv_entry *pve = NULL;
boolean_t wired = (flags & PMAP_WIRED) != 0;
DPRINTF(PDB_FOLLOW|PDB_ENTER,
@@ -822,7 +822,6 @@ pmap_enter(struct pmap *pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags)
DPRINTF(PDB_ENTER,
("pmap_enter: new mapping 0x%x -> 0x%x\n", va, pa));
pte = PTE_PROT(TLB_REFTRAP);
- pve = NULL;
pmap->pm_stats.resident_count++;
if (wired)
pmap->pm_stats.wired_count++;
diff --git a/sys/arch/hppa64/hppa64/pmap.c b/sys/arch/hppa64/hppa64/pmap.c
index 0cffbbfe34d..26a59f7684d 100644
--- a/sys/arch/hppa64/hppa64/pmap.c
+++ b/sys/arch/hppa64/hppa64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.22 2011/09/18 11:55:23 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.23 2012/06/03 13:28:40 jsing Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
@@ -793,7 +793,7 @@ pmap_enter(struct pmap *pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags)
volatile pt_entry_t *pde;
pt_entry_t pte;
struct vm_page *pg, *ptp = NULL;
- struct pv_entry *pve;
+ struct pv_entry *pve = NULL;
boolean_t wired = (flags & PMAP_WIRED) != 0;
DPRINTF(PDB_FOLLOW|PDB_ENTER,
@@ -843,7 +843,6 @@ pmap_enter(struct pmap *pmap, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags)
DPRINTF(PDB_ENTER,
("pmap_enter: new mapping 0x%lx -> 0x%lx\n", va, pa));
pte = PTE_REFTRAP;
- pve = NULL;
pmap->pm_stats.resident_count++;
if (wired)
pmap->pm_stats.wired_count++;