summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/execve.cpp
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-07-27 02:12:51 -0700
committerAndreas Kling <kling@serenityos.org>2021-07-28 19:07:00 +0200
commitba03b6ad020b48040b64aed7c9fb1cc8b7bbda7b (patch)
tree23aaab1f29251f2efcbb2c3f468420f078259fd5 /Kernel/Syscalls/execve.cpp
parentd2cee9cbf69aa43a92b41c6fb76110273cb7c82e (diff)
downloadserenity-ba03b6ad020b48040b64aed7c9fb1cc8b7bbda7b.zip
Kernel: Make Process::FileDescriptions::allocate return KResultOr<int>
Modernize more error checking by utilizing KResultOr.
Diffstat (limited to 'Kernel/Syscalls/execve.cpp')
-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 f7c7517189..090551998d 100644
--- a/Kernel/Syscalls/execve.cpp
+++ b/Kernel/Syscalls/execve.cpp
@@ -591,7 +591,7 @@ KResult Process::do_exec(NonnullRefPtr<FileDescription> main_program_description
int main_program_fd = -1;
if (interpreter_description) {
- main_program_fd = m_fds.allocate();
+ main_program_fd = m_fds.allocate().value();
VERIFY(main_program_fd >= 0);
auto seek_result = main_program_description->seek(0, SEEK_SET);
VERIFY(!seek_result.is_error());