diff options
Diffstat (limited to 'src/hashtable.c')
-rw-r--r-- | src/hashtable.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hashtable.c b/src/hashtable.c index dd6dbfc..86dae82 100644 --- a/src/hashtable.c +++ b/src/hashtable.c @@ -47,7 +47,7 @@ void hash_table_destroy(hashtable_t *ht) ht->free_func(e->value); } hashentry_t* old = e; - e = e->next; + e = (hashentry_t*)e->next; free(old); } } @@ -71,7 +71,7 @@ void hash_table_insert(hashtable_t* ht, void *key, void *value) e->value = value; return; } - e = e->next; + e = (hashentry_t*)e->next; } // if we get here, the element is not yet in the list. @@ -103,7 +103,7 @@ void* hash_table_lookup(hashtable_t* ht, void *key) if (ht->compare_func(e->key, key)) { return e->value; } - e = e->next; + e = (hashentry_t*)e->next; } return NULL; } @@ -124,7 +124,7 @@ void hash_table_remove(hashtable_t* ht, void *key) // found element, remove it from the list hashentry_t* old = e; if (e == ht->entries[idx0]) { - ht->entries[idx0] = e->next; + ht->entries[idx0] = (hashentry_t*)e->next; } else { last->next = e->next; } @@ -135,6 +135,6 @@ void hash_table_remove(hashtable_t* ht, void *key) return; } last = e; - e = e->next; + e = (hashentry_t*)e->next; } } |