aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os/WaitFor.c
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-01-18 22:32:07 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-07 14:57:15 +0200
commit91925d70d901b180fffa1f40e0afafbc4b6c560e (patch)
tree9e63f6bc81018edede1f9b97fecabaa8d67e369b /nx-X11/programs/Xserver/os/WaitFor.c
parentcf461c367d9e2f77896a485f3f6ad5b89a2fc7e2 (diff)
downloadnx-libs-91925d70d901b180fffa1f40e0afafbc4b6c560e.tar.gz
nx-libs-91925d70d901b180fffa1f40e0afafbc4b6c560e.tar.bz2
nx-libs-91925d70d901b180fffa1f40e0afafbc4b6c560e.zip
Clarify use of and need for mffs vs. ffs
Backport of this xorg-xserver commit: commit 75c51c67b340548286efd41a53882e2acaf74ab5 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Jun 18 09:49:12 2009 -0700 Clarify use of and need for mffs vs. ffs Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'nx-X11/programs/Xserver/os/WaitFor.c')
-rw-r--r--nx-X11/programs/Xserver/os/WaitFor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/os/WaitFor.c b/nx-X11/programs/Xserver/os/WaitFor.c
index 3d53335b3..82462b926 100644
--- a/nx-X11/programs/Xserver/os/WaitFor.c
+++ b/nx-X11/programs/Xserver/os/WaitFor.c
@@ -106,6 +106,8 @@ static unsigned long startTimeInMillis;
Windows in the code */
#define GetErrno() errno
+/* like ffs, but uses fd_mask instead of int as argument, so it works
+ when fd_mask is longer than an int, such as common 64-bit platforms */
/* modifications by raphael */
int
mffs(fd_mask mask)
@@ -480,7 +482,7 @@ WaitForSomething(int *pClientsReady)
{
int client_index;
- curclient = ffs (clientsReadable.fds_bits[i]) - 1;
+ curclient = mffs (clientsReadable.fds_bits[i]) - 1;
client_index = /* raphael: modified */
ConnectionTranslation[curclient + (i * (sizeof(fd_mask) * 8))];
pClientsReady[nready++] = client_index;