util: Fix bad code.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 28 Nov 2009 18:45:17 +0000 (10:45 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 28 Nov 2009 18:45:17 +0000 (10:45 -0800)
Uf. How embarrassing.

src/gallium/auxiliary/util/u_math.h

index c4faec6..a5cd657 100644 (file)
@@ -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;