aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-01 22:10:32 -0400
committerIan Moffett <ian@osmora.org>2024-05-01 22:10:32 -0400
commitf14a6be0eb19a6f47fa4c8ae9c4df9b82a158642 (patch)
tree3dca765ab09d15688d014913128a38f13409f7b6 /sys
parent51ad0de583015668df07b278ea4a8076e774b219 (diff)
kernel: vm_map: Refactor mmap()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_map.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 9e40e95..afe6760 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -387,9 +387,7 @@ mmap(void *addr, size_t len, int prot, int flags, int fildes, off_t off)
mapping->vmobj = vmobj;
mapping->physmem_base = 0;
- }
-
- if (addr == NULL && physmem != 0) {
+ } else if (addr == NULL && physmem != 0) {
map_start = physmem + mapoff;
vm_map((void *)map_start, physmem, prot, len);
addr = (void *)physmem;