From 6dc21b196218e9139d5b3e4a5308fe335fc92cf7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 16 Apr 2016 02:09:55 +0200 Subject: [PATCH] gallium/util: fix undefined shift to the last bit in u_bit_scan MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Nicolai Hähnle --- src/gallium/auxiliary/util/u_math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/auxiliary/util/u_math.h b/src/gallium/auxiliary/util/u_math.h index 0a829158b11..d983af33203 100644 --- a/src/gallium/auxiliary/util/u_math.h +++ b/src/gallium/auxiliary/util/u_math.h @@ -489,7 +489,7 @@ static inline int u_bit_scan(unsigned *mask) { int i = ffs(*mask) - 1; - *mask &= ~(1 << i); + *mask &= ~(1u << i); return i; } -- 2.30.2