mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 21:20:12 +01:00
util/bitset: Wrap __size in braces
Otherwise funny things can happen with the < operator because of precedence rules. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37908>
This commit is contained in:
parent
12e22d5bc1
commit
1920a99115
1 changed files with 1 additions and 1 deletions
|
|
@ -423,7 +423,7 @@ __bitset_next_set(unsigned i, BITSET_WORD *tmp,
|
|||
#define BITSET_FOREACH_SET(__i, __set, __size) \
|
||||
for (BITSET_WORD __tmp = (__size) == 0 ? 0 : *(__set), *__foo = &__tmp; __foo != NULL; __foo = NULL) \
|
||||
for (__i = 0; \
|
||||
(__i = __bitset_next_set(__i, &__tmp, __set, __size)) < __size;)
|
||||
(__i = __bitset_next_set(__i, &__tmp, __set, __size)) < (__size);)
|
||||
|
||||
static inline void
|
||||
__bitset_next_range(unsigned *start, unsigned *end, const BITSET_WORD *set,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue