From 89faf05372902e19c0d15691022d4b0cf29ba2ef Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 13 Jun 2024 00:57:38 -0400 Subject: kernel/amd64: pmap: Fixup and improve consistency Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/pmap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/arch/amd64') 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); -- cgit v1.2.3