From e27902a261361e8a7980db14138ef13753db196d Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sat, 20 Oct 2018 18:00:09 +0100 Subject: util: use C99 declaration in the for-loop set_foreach() macro Signed-off-by: Eric Engestrom Reviewed-by: Timothy Arceri --- src/util/set.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/util/set.h') diff --git a/src/util/set.h b/src/util/set.h index ffd19a798bd..54719e4c8ab 100644 --- a/src/util/set.h +++ b/src/util/set.h @@ -96,9 +96,9 @@ _mesa_set_random_entry(struct set *set, * insertion (which may rehash the set, making entry a dangling * pointer). */ -#define set_foreach(set, entry) \ - for (entry = _mesa_set_next_entry(set, NULL); \ - entry != NULL; \ +#define set_foreach(set, entry) \ + for (struct set_entry *entry = _mesa_set_next_entry(set, NULL); \ + entry != NULL; \ entry = _mesa_set_next_entry(set, entry)) #ifdef __cplusplus -- cgit v1.2.3