From 63013010259d5e896fc72ac639370c62f1b0f3ed Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 1 Jan 2015 10:28:00 +0100 Subject: [PATCH] Updates to TommyDS 2.0. --- tommyds/tommyhashdyn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tommyds/tommyhashdyn.c b/tommyds/tommyhashdyn.c index 8aa3e53a..02ef4049 100644 --- a/tommyds/tommyhashdyn.c +++ b/tommyds/tommyhashdyn.c @@ -84,11 +84,11 @@ static void tommy_hashdyn_resize(tommy_hashdyn* hashdyn, tommy_count_t new_bucke j = hashdyn->bucket[i]; while (j) { tommy_hashdyn_node* j_next = j->next; - tommy_count_t index = j->key & new_bucket_mask; - if (new_bucket[index]) - tommy_list_insert_tail_not_empty(new_bucket[index], j); + tommy_count_t pos = j->key & new_bucket_mask; + if (new_bucket[pos]) + tommy_list_insert_tail_not_empty(new_bucket[pos], j); else - tommy_list_insert_first(&new_bucket[index], j); + tommy_list_insert_first(&new_bucket[pos], j); j = j_next; } }