diff -aur a/dix/ffs.c b/dix/ffs.c --- a/dix/ffs.c 2006-07-05 11:31:36.000000000 -0700 +++ b/dix/ffs.c 2006-11-09 21:46:11.000000000 -0800 @@ -31,6 +31,7 @@ ffs(int i) { int j; + if (i == 0) return 0; for (j = 1; (i & 1) == 0; j++) i >>= 1; return j;