mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Kernel: Use TRY() in sys$waitid()
This commit is contained in:
parent
c076d765c4
commit
12d9a6c1fa
Notes:
sideshowbarker
2024-07-18 04:40:37 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/12d9a6c1fa3
1 changed files with 2 additions and 5 deletions
|
@ -52,11 +52,8 @@ KResultOr<FlatPtr> Process::sys$waitid(Userspace<const Syscall::SC_waitid_params
|
|||
|
||||
dbgln_if(PROCESS_DEBUG, "sys$waitid({}, {}, {}, {})", params.idtype, params.id, params.infop, params.options);
|
||||
|
||||
auto siginfo_or_error = do_waitid(move(waitee), params.options);
|
||||
if (siginfo_or_error.is_error())
|
||||
return siginfo_or_error.error();
|
||||
|
||||
return copy_to_user(params.infop, &siginfo_or_error.value());
|
||||
auto siginfo = TRY(do_waitid(move(waitee), params.options));
|
||||
return copy_to_user(params.infop, &siginfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue