aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/amd64/amd64/pmap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c
index 27bb44d..6047699 100644
--- a/sys/arch/amd64/amd64/pmap.c
+++ b/sys/arch/amd64/amd64/pmap.c
@@ -117,13 +117,14 @@ pmap_extract(uint8_t level, vaddr_t va, vaddr_t *pmap, bool alloc)
}
if (!alloc) {
- return 0;
+ return NULL;
}
/* Allocate the next level */
level_alloc = vm_alloc_frame(1);
- if (level_alloc == 0)
- return 0;
+ if (level_alloc == 0) {
+ return NULL;
+ }
memset(PHYS_TO_VIRT(level_alloc), 0, DEFAULT_PAGESIZE);
pmap[idx] = level_alloc | (PTE_P | PTE_RW | PTE_US);