From 9d78a7fce3733615de73138e344888395ba055db Mon Sep 17 00:00:00 2001 From: sepotvin Date: Mon, 2 Feb 2009 03:34:40 +0000 Subject: [PATCH] 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) --- sys/kern/sys_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 17a449e70fdd..320961059354 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -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 bit) 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]; }