diff options
author | Ian Moffett <ian@osmora.org> | 2024-06-13 00:57:38 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-06-13 00:57:38 -0400 |
commit | 89faf05372902e19c0d15691022d4b0cf29ba2ef (patch) | |
tree | 6d2f18a6a372fdaf4f3ac2bd89428720c3e16495 | |
parent | 2b5b3c8ca233d13fd4757e6e88ac60cfd00653ac (diff) |
kernel/amd64: pmap: Fixup and improve consistency
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r-- | sys/arch/amd64/amd64/pmap.c | 7 |
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); |