mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-26 19:54:57 +00:00
Slight optimization to select().
This commit is contained in:
parent
ed8be72c29
commit
cf0ec51aec
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7801
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)sys_generic.c 8.5 (Berkeley) 1/21/94
|
||||
* $Id: sys_generic.c,v 1.9 1994/10/13 21:01:47 sos Exp $
|
||||
* $Id: sys_generic.c,v 1.10 1994/10/13 21:41:36 sos Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -539,13 +539,11 @@ select(p, uap, retval)
|
|||
register struct select_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
fd_set ibits[3], obits[3];
|
||||
fd_set ibits[3] = {0,0,0}, obits[3] = {0,0,0};
|
||||
struct timeval atv;
|
||||
int s, ncoll, error = 0, timo;
|
||||
u_int ni;
|
||||
|
||||
bzero((caddr_t)ibits, sizeof(ibits));
|
||||
bzero((caddr_t)obits, sizeof(obits));
|
||||
if (uap->nd > FD_SETSIZE)
|
||||
return (EINVAL);
|
||||
if (uap->nd > p->p_fd->fd_nfiles)
|
||||
|
|
Loading…
Reference in a new issue