Minor hash_iter() code cleanup.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 11 Nov 2011 02:19:48 -0500
changeset 1064 d3f0f4cf84f2
parent 1063 b10281d6eb45
child 1065 bb021d539ec5
Minor hash_iter() code cleanup.
mojoshader_common.c
--- a/mojoshader_common.c	Tue Oct 25 12:01:34 2011 -0400
+++ b/mojoshader_common.c	Fri Nov 11 02:19:48 2011 -0500
@@ -62,21 +62,21 @@
 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.