mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
Kernel: Use TRY() more in process-specific ProcFS code
This commit is contained in:
parent
f4a6b60570
commit
398f8e7c96
Notes:
sideshowbarker
2024-07-18 04:38:35 +09:00
Author: https://github.com/awesomekling
Commit: 398f8e7c96
2 changed files with 4 additions and 19 deletions
|
@ -112,10 +112,7 @@ KResultOr<NonnullRefPtr<Inode>> Process::lookup_file_descriptions_directory(cons
|
|||
if (!fds().get_if_valid(*maybe_index))
|
||||
return ENOENT;
|
||||
|
||||
auto maybe_inode = ProcFSProcessPropertyInode::try_create_for_file_description_link(procfs, *maybe_index, pid());
|
||||
if (maybe_inode.is_error())
|
||||
return maybe_inode.error();
|
||||
return maybe_inode.release_value();
|
||||
return TRY(ProcFSProcessPropertyInode::try_create_for_file_description_link(procfs, *maybe_index, pid()));
|
||||
}
|
||||
|
||||
KResult Process::procfs_get_pledge_stats(KBufferBuilder& builder) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue