sel_setevents: fix error - match event-set, as intended.

Spotted by Enami Tsugutomo.
This commit is contained in:
rmind 2010-07-12 11:04:25 +00:00
parent c463da08f1
commit 25ce398524
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sys_select.c,v 1.26 2010/07/11 11:17:58 rmind Exp $ */
/* $NetBSD: sys_select.c,v 1.27 2010/07/12 11:04:25 rmind Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009, 2010 The NetBSD Foundation, Inc.
@ -84,7 +84,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.26 2010/07/11 11:17:58 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.27 2010/07/12 11:04:25 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -639,7 +639,7 @@ sel_setevents(lwp_t *l, struct selinfo *sip, const int events)
int n;
for (n = 0; n < 3; n++) {
if (sel_flag[n] | events) {
if (sel_flag[n] & events) {
fds[idx] |= 1 << (fd & __NFDMASK);
}
fds = (fd_mask *)((char *)fds + ni);