diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-06-30 13:01:59 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-11-15 13:14:07 +1000 |
commit | 45df930fbf1230e5532e576f16d0f3c303b8277a (patch) | |
tree | 529ecc9796864c0b24fbf0422f2686db4370947c | |
parent | 8f41829e68852afa675101d20a74c6063af286c2 (diff) |
Purge wffs - use ffs(3) instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | xts5/src/libproto/ClientMng.c | 2 | ||||
-rw-r--r-- | xts5/src/libproto/Utils.c | 23 |
2 files changed, 1 insertions, 24 deletions
diff --git a/xts5/src/libproto/ClientMng.c b/xts5/src/libproto/ClientMng.c index aa9f63b3..833e418b 100644 --- a/xts5/src/libproto/ClientMng.c +++ b/xts5/src/libproto/ClientMng.c @@ -584,7 +584,7 @@ int cl; /* client number */ dpy -> wire_vec[i] = NULL; } dpy -> resource_id = 0; - dpy -> resource_shift = wffs ((int) dpy -> resource_mask) - 1; + dpy -> resource_shift = ffs ((int) dpy -> resource_mask) - 1; /* dpy -> db = (struct _XrmHashBucketRec *) NULL; */ /* * Initialize pointers to NULL so that XstFreeDisplayStructure will diff --git a/xts5/src/libproto/Utils.c b/xts5/src/libproto/Utils.c index 692a57eb..17d721df 100644 --- a/xts5/src/libproto/Utils.c +++ b/xts5/src/libproto/Utils.c @@ -162,26 +162,3 @@ Get_Date() return(buf); } -/* Find the first set bit - * i.e. least signifigant 1 bit: - * 0 => 0 - * 1 => 1 - * 2 => 2 - * 3 => 1 - * 4 => 3 - */ - -int -wffs(mask) -unsigned int mask; -{ - register i; - - if ( ! mask ) return 0; - i = 1; - while (! (mask & 1)) { - i++; - mask = mask >> 1; - } - return i; -} |