aboutsummaryrefslogtreecommitdiff
path: root/src/hash.c
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2016-04-28 20:39:37 -0400
committerFranklin Wei <git@fwei.tk>2016-04-28 20:39:37 -0400
commit7f3ba14388a586a946d721a71eb3a9862f7f6c02 (patch)
tree05c96d39815a3719131ad966a73d1ba40fd96d75 /src/hash.c
parent0db524c05e0e077c06c7d02eaa2921159df04313 (diff)
downloadnetcosm-7f3ba14388a586a946d721a71eb3a9862f7f6c02.zip
netcosm-7f3ba14388a586a946d721a71eb3a9862f7f6c02.tar.gz
netcosm-7f3ba14388a586a946d721a71eb3a9862f7f6c02.tar.bz2
netcosm-7f3ba14388a586a946d721a71eb3a9862f7f6c02.tar.xz
fix build dependency checking, cleanup, simulation callback
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hash.c b/src/hash.c
index 1e7b732..a2938e1 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -200,6 +200,7 @@ static void hash_internal_insert_new(const void *key, const void *data, struct h
/* resize if load factor exceeds threshold */
if((map->used_buckets << 16) / (map->table_sz) >= RESIZE_THRESHOLD)
{
+ //printf("resizing map of %zu elements...\n", map->used_buckets);
hash_resize(map, map->table_sz * 2);
}
}
@@ -548,7 +549,7 @@ void hash_dump(void *ptr)
--used_buckets;
while(iter)
{
- printf(" --> `%s'", iter->key);
+ printf(" --> `%s'", (char*)iter->key);
++n_entries;
iter = iter->next;
}