u_math.h: Change power of two assert to fix warning C4146: unary minus operator applied to unsigned type, result still unsigned

Reviewed-By: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32979>
This commit is contained in:
Sil Vilerino 2025-01-09 07:10:45 -05:00 committed by Marge Bot
parent 8f8438bd8c
commit b5617058e4

View file

@ -830,7 +830,7 @@ util_clamped_uadd(unsigned a, unsigned b)
static inline bool
util_is_aligned(uintmax_t n, uintmax_t a)
{
assert(a == (a & -a));
assert((a != 0) && ((a & (a - 1)) == 0));
return (n & (a - 1)) == 0;
}