From 585f4b5216f3553699892a0573b84678917b2eae Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 11 Nov 2011 02:19:48 -0500 Subject: [PATCH] Minor hash_iter() code cleanup. --- mojoshader_common.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mojoshader_common.c b/mojoshader_common.c index c9d82cb6..5d57d59d 100644 --- a/mojoshader_common.c +++ b/mojoshader_common.c @@ -62,21 +62,21 @@ int hash_find(const HashTable *table, const void *key, const void **_value) int hash_iter(const HashTable *table, const void *key, const void **_value, void **iter) { - HashItem *i = *iter; - if (i == NULL) - i = table->table[calc_hash(table, key)]; + HashItem *item = *iter; + if (item == NULL) + item = table->table[calc_hash(table, key)]; else - i = i->next; + item = item->next; - while (i != NULL) + while (item != NULL) { - if (table->keymatch(key, i->key, table->data)) + if (table->keymatch(key, item->key, table->data)) { - *_value = i->value; - *iter = i; + *_value = item->value; + *iter = item; return 1; } // if - i = i->next; + item = item->next; } // while // no more matches.