From afe83d5059d71e05be02e3d1f0df7cb8820149f6 Mon Sep 17 00:00:00 2001 From: Starnakin Date: Sun, 30 Nov 2025 15:10:51 +0100 Subject: [PATCH] add: parentheses around param in PTE2VA --- headers/memory.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/headers/memory.h b/headers/memory.h index 5b81b42..d7f0632 100644 --- a/headers/memory.h +++ b/headers/memory.h @@ -32,9 +32,7 @@ ((uint32_t *)(VIRT_PT_BASE + ((uint32_t)pd_index) * 4096 + \ ((uint32_t)pt_index) * 4)) -#define PTE2VA(pd_index, pt_index) \ - ((uint32_t *)((((uint32_t)pd_index * 1024) + (uint32_t)pt_index) * \ - 4096)) +#define PTE2VA(pd_index, pt_index) ((uint32_t*) ((((((uint32_t)pd_index) * 1024) + ((uint32_t)pt_index)) * 4096))) static inline uint32_t *VA2PTE(uint32_t va) { uint32_t pde = va >> 22;