mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Updates to TommyDS 2.0.
This commit is contained in:
parent
83082d2264
commit
6301301025
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue