mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Kernel: Avoid magic number in sys$poll
This commit is contained in:
parent
cc341c95aa
commit
c0692f1f95
Notes:
sideshowbarker
2024-07-18 22:19:57 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/c0692f1f95a Pull-request: https://github.com/SerenityOS/serenity/pull/5340
1 changed files with 1 additions and 2 deletions
|
@ -147,8 +147,7 @@ int Process::sys$poll(Userspace<const Syscall::SC_poll_params*> user_params)
|
|||
if (!copy_from_user(¶ms, user_params))
|
||||
return -EFAULT;
|
||||
|
||||
// This limit is just a number from the place where numbers come from.
|
||||
if (params.nfds >= 16384)
|
||||
if (params.nfds >= m_max_open_file_descriptors)
|
||||
return -ENOBUFS;
|
||||
|
||||
Thread::BlockTimeout timeout;
|
||||
|
|
Loading…
Reference in a new issue