diff options
author | Matt Turner <[email protected]> | 2020-01-21 15:07:24 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-23 01:52:43 +0000 |
commit | 4413537c80b58978f61f468a5a36d1d75756d6b3 (patch) | |
tree | 67363cae1c92d1d406bee03f5016318bc55b5c78 /src/util/bitset.h | |
parent | d3eb2a0951ede3c7dcce891c3a153f3ebbb59bae (diff) |
util: Remove tmp argument from BITSET_FOREACH_SET macro
Reviewed-by: Jason Ekstrand <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3499>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3499>
Diffstat (limited to 'src/util/bitset.h')
-rw-r--r-- | src/util/bitset.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util/bitset.h b/src/util/bitset.h index f58d9f214e6..0fdfe205f39 100644 --- a/src/util/bitset.h +++ b/src/util/bitset.h @@ -133,13 +133,13 @@ __bitset_next_set(unsigned i, BITSET_WORD *tmp, * Iterates over each set bit in a set * * @param __i iteration variable, bit number - * @param __tmp an internally-used temporary bitset * @param __set the bitset to iterate (will not be modified) * @param __size number of bits in the set to consider */ -#define BITSET_FOREACH_SET(__i, __tmp, __set, __size) \ - for (__tmp = *(__set), __i = 0; \ - (__i = __bitset_next_set(__i, &__tmp, __set, __size)) < __size;) +#define BITSET_FOREACH_SET(__i, __set, __size) \ + for (BITSET_WORD __tmp = *(__set), *__foo = &__tmp; __foo != NULL; __foo = NULL) \ + for (__i = 0; \ + (__i = __bitset_next_set(__i, &__tmp, __set, __size)) < __size;) #ifdef __cplusplus |