From: Corbin Simpson Date: Sat, 28 Nov 2009 18:45:17 +0000 (-0800) Subject: util: Fix bad code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=287bdd8e75aa3b2c20f50de359711158981dfa09;p=mesa.git util: Fix bad code. Uf. How embarrassing. --- 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;