mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-17 05:12:58 +00:00
Kernel: Avoid magic number in sys$poll
This commit is contained in:
parent
cc341c95aa
commit
c0692f1f95
|
@ -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