summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pipe_aaline.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-02-02 21:17:56 -0700
committerBrian Paul <[email protected]>2010-02-02 21:17:56 -0700
commitc173eb990a20611ac47c1727e1fb11d7fd3aa0c4 (patch)
treeaf15186e54aebf471f6b1691e67baca55bad55cb /src/gallium/auxiliary/draw/draw_pipe_aaline.c
parent3d5e26ebecd2cce4dd6ad7d479a968e1859e11df (diff)
draw: re-implement free_bit() with ffs()
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pipe_aaline.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pipe_aaline.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pipe_aaline.c b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
index 4585dcdb48a..54bb9d4b84a 100644
--- a/src/gallium/auxiliary/draw/draw_pipe_aaline.c
+++ b/src/gallium/auxiliary/draw/draw_pipe_aaline.c
@@ -178,12 +178,7 @@ aa_transform_decl(struct tgsi_transform_context *ctx,
static int
free_bit(uint bitfield)
{
- int i;
- for (i = 0; i < 32; i++) {
- if ((bitfield & (1 << i)) == 0)
- return i;
- }
- return -1;
+ return ffs(~bitfield) - 1;
}