diff options
author | Andrew Kaster <akaster@serenityos.org> | 2021-10-31 16:45:01 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-14 22:52:35 +0100 |
commit | bc29c7f04ffee4b9f29c4ef2b8bfcb9efc4f1df2 (patch) | |
tree | 5823297907c60dcb18c32642555ace85a1018f75 /Kernel/Process.cpp | |
parent | fff265a9a99d255439de538acf63ac053854e55c (diff) | |
download | serenity-bc29c7f04ffee4b9f29c4ef2b8bfcb9efc4f1df2.zip |
Kernel: Make OpenFileDescriptions::max_open() static and constexpr
This method was just returning a static constexpr member variable
verbatim, so there's no point requiring a member function to observe
its value.
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r-- | Kernel/Process.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index e30414aa81..6436ab7262 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -151,7 +151,7 @@ ErrorOr<NonnullRefPtr<Process>> Process::try_create_user_process(RefPtr<Thread>& auto name = TRY(KString::try_create(parts.last())); auto process = TRY(Process::try_create(first_thread, move(name), uid, gid, ProcessID(0), false, VirtualFileSystem::the().root_custody(), nullptr, tty)); - TRY(process->m_fds.try_resize(process->m_fds.max_open())); + TRY(process->m_fds.try_resize(Process::OpenFileDescriptions::max_open())); auto& device_to_use_as_tty = tty ? (CharacterDevice&)*tty : DeviceManagement::the().null_device(); auto description = TRY(device_to_use_as_tty.open(O_RDWR)); |