feat(hmp): use the new ds_*ll_init func in ds_hmp_insert
This commit is contained in:
parent
4248a678c1
commit
a701aa8d5d
1 changed files with 1 additions and 1 deletions
2
ds.c
2
ds.c
|
|
@ -237,7 +237,7 @@ ds_hmp_insert(ds_hmp_t *hmp, char *key, void *data)
|
||||||
|
|
||||||
hash_pos = _ds_hmp_gen_hash(key) % hmp->data_len;
|
hash_pos = _ds_hmp_gen_hash(key) % hmp->data_len;
|
||||||
if (!hmp->data[hash_pos]) {
|
if (!hmp->data[hash_pos]) {
|
||||||
hmp->data[hash_pos] = calloc(1, sizeof(ds_sll_t));
|
hmp->data[hash_pos] = ds_sll_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the ll and put the data into it */
|
/* get the ll and put the data into it */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue