From: Andrzej Trznadel Date: Mon, 17 Mar 2008 22:52:08 +0000 (-0700) Subject: Fix compat implementation of ffs() to return 1-based bit numbers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9809a36aaea3480cba5bd62360bf9d481ff9011;p=mesa.git Fix compat implementation of ffs() to return 1-based bit numbers. --- diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 3ae56c8b0b6..7d4b1200992 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -560,6 +560,7 @@ _mesa_ffs(int i) bit++; i >>= 1; } + bit++; } return bit; #else