Slight optimization to select().

This commit is contained in:
David Greenman 1995-04-13 15:27:51 +00:00
parent ed8be72c29
commit cf0ec51aec
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7801

View file

@ -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)