Slight optimization to select().
This commit is contained in:
parent
9f4d73caf8
commit
2474db4145
@ -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 New Issue
Block a user