svn commit: r187996 - head/sys/kern

Stephane E. Potvin sepotvin at FreeBSD.org
Sun Feb 1 19:34:41 PST 2009


Author: sepotvin
Date: Mon Feb  2 03:34:40 2009
New Revision: 187996
URL: http://svn.freebsd.org/changeset/base/187996

Log:
  Fix select on platforms where sizeof(long) != sizeof(int). This used
  to work by accident before the cleanup done in revision 187693.
  
  Approved by:	kan (mentor)

Modified:
  head/sys/kern/sys_generic.c

Modified: head/sys/kern/sys_generic.c
==============================================================================
--- head/sys/kern/sys_generic.c	Mon Feb  2 02:05:58 2009	(r187995)
+++ head/sys/kern/sys_generic.c	Mon Feb  2 03:34:40 2009	(r187996)
@@ -903,7 +903,7 @@ static int select_flags[3] = {
  * bit position in the fd_mask array.
  */
 static __inline int
-selflags(fd_mask **ibits, int idx, int bit)
+selflags(fd_mask **ibits, int idx, fd_mask bit)
 {
 	int flags;
 	int msk;
@@ -912,7 +912,7 @@ selflags(fd_mask **ibits, int idx, int b
 	for (msk = 0; msk < 3; msk++) {
 		if (ibits[msk] == NULL)
 			continue;
-		if ((ibits[msk][idx] & (fd_mask)bit) == 0)
+		if ((ibits[msk][idx] & bit) == 0)
 			continue;
 		flags |= select_flags[msk];
 	}


More information about the svn-src-head mailing list