summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-12-25 14:16:35 +0100
committerAndreas Kling <kling@serenityos.org>2020-12-25 14:16:35 +0100
commit791b32e3c6d8d0948d8475954915d4eb933f8913 (patch)
tree30f27e11e9c1b6658fb011726cdc2f7b88303cba /Kernel
parent9c640e67ac4e61e75ad575a74d262ce19a479c9f (diff)
downloadserenity-791b32e3c6d8d0948d8475954915d4eb933f8913.zip
Kernel: Remove an unnecessary cast in sys$execve()
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Syscalls/execve.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp
index a6b56fecb9..fb6c666c0f 100644
--- a/Kernel/Syscalls/execve.cpp
+++ b/Kernel/Syscalls/execve.cpp
@@ -63,7 +63,7 @@ KResultOr<Process::LoadResult> Process::load_elf_object(FileDescription& object_
{
auto& inode = *(object_description.inode());
auto vmobject = SharedInodeVMObject::create_with_inode(inode);
- if (static_cast<const SharedInodeVMObject&>(*vmobject).writable_mappings()) {
+ if (vmobject->writable_mappings()) {
dbgln("Refusing to execute a write-mapped program");
return KResult(-ETXTBSY);
}