aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/ffs.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/ffs.c')
-rw-r--r--xorg-server/dix/ffs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xorg-server/dix/ffs.c b/xorg-server/dix/ffs.c
index d0bd3e507..f0400cbd1 100644
--- a/xorg-server/dix/ffs.c
+++ b/xorg-server/dix/ffs.c
@@ -38,10 +38,11 @@ int
ffs(int i)
{
int j;
+
if (i == 0)
return 0;
for (j = 1; (i & 1) == 0; j++)
- i >>= 1;
+ i >>= 1;
return j;
}