[Mesa-dev] [PATCH] gallium/util: fix undefined shift to the last bit in u_bit_scan
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Sat Apr 16 00:35:11 UTC 2016
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Sat, Apr 16, 2016 at 2:13 AM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
> 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 0a82915..d983af3 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.5.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list