diff options
| author | Franklin Wei <git@fwei.tk> | 2016-01-22 19:14:06 -0500 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2016-01-22 19:14:06 -0500 |
| commit | f2a04d689ad656c0ef915261025cb0ce534c4c48 (patch) | |
| tree | 7bbca8c06d2443c1ed7b4a6241e696b9362a7de9 /src/hash.c | |
| parent | b33d9c81c116d43b38ceb8b247bd77f9736574b9 (diff) | |
| download | netcosm-f2a04d689ad656c0ef915261025cb0ce534c4c48.zip netcosm-f2a04d689ad656c0ef915261025cb0ce534c4c48.tar.gz netcosm-f2a04d689ad656c0ef915261025cb0ce534c4c48.tar.bz2 netcosm-f2a04d689ad656c0ef915261025cb0ce534c4c48.tar.xz | |
static analysis is *AWESOME*!
Diffstat (limited to 'src/hash.c')
| -rw-r--r-- | src/hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -60,7 +60,7 @@ void *hash_init(size_t sz, unsigned (*hash_fn)(const void*), int (*compare_keys)(const void*, const void*)) { struct hash_map *ret = calloc(sizeof(struct hash_map), 1); - ret->table = calloc(sizeof(struct hash_node), sz); + ret->table = calloc(sz, sizeof(struct hash_node*)); ret->table_sz = sz; ret->hash = hash_fn; ret->compare = compare_keys; |