mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
Kernel: Make Process::FileDescriptions::allocate return KResultOr<int>
Modernize more error checking by utilizing KResultOr.
This commit is contained in:
parent
d2cee9cbf6
commit
ba03b6ad02
10 changed files with 48 additions and 37 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue