summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorHendiadyoin1 <leon2002.la@gmail.com>2021-12-18 18:40:17 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-18 10:31:18 -0800
commit2d28b441bf25fb91e68870c1bfeeac91ca761325 (patch)
tree04c60f0fa2034c91ce9e7b6e5deabc8fe2c4f21d /Kernel
parentf38d32535c44069b4681e2d1a8b484e98dd5ab28 (diff)
downloadserenity-2d28b441bf25fb91e68870c1bfeeac91ca761325.zip
Kernel: Collapse a redundant boolean conditional return statement in …
validate_mmap_prot
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Syscalls/mmap.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp
index eeaabc98be..4fc530b66a 100644
--- a/Kernel/Syscalls/mmap.cpp
+++ b/Kernel/Syscalls/mmap.cpp
@@ -88,10 +88,7 @@ static bool validate_mmap_prot(int prot, bool map_stack, bool map_anonymous, Mem
return false;
if (make_executable && region->has_been_writable()) {
- if (should_make_executable_exception_for_dynamic_loader(make_readable, make_writable, make_executable, *region))
- return true;
-
- return false;
+ return should_make_executable_exception_for_dynamic_loader(make_readable, make_writable, make_executable, *region);
}
}