mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +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
Notes:
sideshowbarker
2024-07-18 07:59:38 +09:00
Author: https://github.com/bgianfo
Commit: ba03b6ad02
Pull-request: https://github.com/SerenityOS/serenity/pull/9034
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/gunnarbeutner
10 changed files with 48 additions and 37 deletions
|
@ -641,7 +641,7 @@ public:
|
|||
void enumerate(Function<void(const FileDescriptionAndFlags&)>) const;
|
||||
void change_each(Function<void(FileDescriptionAndFlags&)>);
|
||||
|
||||
int allocate(int first_candidate_fd = 0);
|
||||
KResultOr<int> allocate(int first_candidate_fd = 0);
|
||||
size_t open_count() const;
|
||||
|
||||
bool try_resize(size_t size) { return m_fds_metadatas.try_resize(size); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue