summaryrefslogtreecommitdiffstats
path: root/src/util/hash_table.c
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-10-20 18:00:08 +0100
committerEric Engestrom <[email protected]>2018-10-25 12:43:18 +0100
commitbb84fa146f2252f22999205a2904d8a948bffd3b (patch)
tree2e4773252d67da46590ec4a545fc10f6125043a9 /src/util/hash_table.c
parent3d261cf77b35c56cc575ce9bb7909d2f8d920233 (diff)
util: use C99 declaration in the for-loop hash_table_foreach() macro
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/util/hash_table.c')
-rw-r--r--src/util/hash_table.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/util/hash_table.c b/src/util/hash_table.c
index 7ee9e18a1fc..fc152f84a4d 100644
--- a/src/util/hash_table.c
+++ b/src/util/hash_table.c
@@ -177,8 +177,6 @@ _mesa_hash_table_destroy(struct hash_table *ht,
return;
if (delete_function) {
- struct hash_entry *entry;
-
hash_table_foreach(ht, entry) {
delete_function(entry);
}
@@ -284,7 +282,7 @@ static void
_mesa_hash_table_rehash(struct hash_table *ht, unsigned new_size_index)
{
struct hash_table old_ht;
- struct hash_entry *table, *entry;
+ struct hash_entry *table;
if (new_size_index >= ARRAY_SIZE(hash_sizes))
return;