summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_math.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util/u_math.h')
-rw-r--r--src/gallium/auxiliary/util/u_math.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h
index c4faec671cb..a5cd6574c0e 100644
--- a/src/gallium/auxiliary/util/u_math.h
+++ b/src/gallium/auxiliary/util/u_math.h
@@ -506,7 +506,7 @@ util_bitcount(unsigned n)
* one iteration per bit less than highest set bit.
*/
unsigned bits = 0;
- for (bits, n, bits++) {
+ for (bits; n; bits++) {
n &= n - 1;
}
return bits;