mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-28 11:57:28 +00:00
fd: dedup code in sys_getdtablesize
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
73e62bc9bb
commit
6b2d61136f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341819
@ -348,8 +348,7 @@ sys_getdtablesize(struct thread *td, struct getdtablesize_args *uap)
|
||||
uint64_t lim;
|
||||
#endif
|
||||
|
||||
td->td_retval[0] =
|
||||
min((int)lim_cur(td, RLIMIT_NOFILE), maxfilesperproc);
|
||||
td->td_retval[0] = getmaxfd(td);
|
||||
#ifdef RACCT
|
||||
PROC_LOCK(td->td_proc);
|
||||
lim = racct_get_limit(td->td_proc, RACCT_NOFILE);
|
||||
|
Loading…
Reference in New Issue
Block a user