summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-06-30 13:01:59 +1000
committerAaron Plattner <aplattner@nvidia.com>2011-04-12 15:41:31 -0700
commit8566a6af74dfe8021ce16c75fe8029e2e8c4b488 (patch)
tree3902d207347fd2035ba9c29870312ebf34e6fe91
parentd5594404053d8cfbf7990721640f0ace31ae0d1d (diff)
Purge wffs - use ffs(3) instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
-rw-r--r--xts5/src/libproto/ClientMng.c2
-rw-r--r--xts5/src/libproto/Utils.c24
2 files changed, 1 insertions, 25 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 f1d4d10e..af2ffb1b 100644
--- a/xts5/src/libproto/Utils.c
+++ b/xts5/src/libproto/Utils.c
@@ -185,27 +185,3 @@ register length;
}
}
}
-
-/* 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;
-}