diff options
author | Bruno Haible <bruno@clisp.org> | 2006-10-10 12:48:57 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2006-10-10 12:48:57 +0000 |
commit | 935e9f0bda3d20a28516e3e369946fe6fbe60043 (patch) | |
tree | 2788f8d2b2ce4186bcbb449a27c1c457ed66d667 /lib/gl_anylinked_list2.h | |
parent | 33e26f502397b23115df4d7f6af2e82af55b0f91 (diff) | |
download | gnulib-935e9f0bda3d20a28516e3e369946fe6fbe60043.tar.gz |
Avoid using the variable name 'index' for two completely different things.
Diffstat (limited to 'lib/gl_anylinked_list2.h')
-rw-r--r-- | lib/gl_anylinked_list2.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gl_anylinked_list2.h b/lib/gl_anylinked_list2.h index bc551edd6b..7753367545 100644 --- a/lib/gl_anylinked_list2.h +++ b/lib/gl_anylinked_list2.h @@ -229,7 +229,7 @@ gl_linked_search_from_to (gl_list_t list, size_t start_index, size_t end_index, (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (elt) : (size_t)(uintptr_t) elt); - size_t index = hashcode % list->table_size; + size_t bucket = hashcode % list->table_size; gl_listelement_equals_fn equals = list->base.equals_fn; if (!list->base.allow_duplicates) @@ -238,7 +238,7 @@ gl_linked_search_from_to (gl_list_t list, size_t start_index, size_t end_index, gl_list_node_t found = NULL; gl_list_node_t node; - for (node = (gl_list_node_t) list->table[index]; + for (node = (gl_list_node_t) list->table[bucket]; node != NULL; node = (gl_list_node_t) node->h.hash_next) if (node->h.hashcode == hashcode @@ -279,7 +279,7 @@ gl_linked_search_from_to (gl_list_t list, size_t start_index, size_t end_index, gl_list_node_t first_match = NULL; gl_list_node_t node; - for (node = (gl_list_node_t) list->table[index]; + for (node = (gl_list_node_t) list->table[bucket]; node != NULL; node = (gl_list_node_t) node->h.hash_next) if (node->h.hashcode == hashcode @@ -385,7 +385,7 @@ gl_linked_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, (list->base.hashcode_fn != NULL ? list->base.hashcode_fn (elt) : (size_t)(uintptr_t) elt); - size_t index = hashcode % list->table_size; + size_t bucket = hashcode % list->table_size; gl_listelement_equals_fn equals = list->base.equals_fn; gl_list_node_t node; @@ -393,7 +393,7 @@ gl_linked_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, if (!list->base.allow_duplicates) { /* Look for the first match in the hash bucket. */ - for (node = (gl_list_node_t) list->table[index]; + for (node = (gl_list_node_t) list->table[bucket]; node != NULL; node = (gl_list_node_t) node->h.hash_next) if (node->h.hashcode == hashcode @@ -408,7 +408,7 @@ gl_linked_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, bool multiple_matches = false; gl_list_node_t first_match = NULL; - for (node = (gl_list_node_t) list->table[index]; + for (node = (gl_list_node_t) list->table[bucket]; node != NULL; node = (gl_list_node_t) node->h.hash_next) if (node->h.hashcode == hashcode |