...
|
...
|
@@ -444,8 +444,6 @@ int cli_hashset_init(struct cli_hashset* hs, size_t initial_capacity, uint8_t lo
|
444
|
444
|
|
445
|
445
|
void cli_hashset_destroy(struct cli_hashset* hs)
|
446
|
446
|
{
|
447
|
|
- if (!hs->keys)
|
448
|
|
- return;
|
449
|
447
|
cli_dbgmsg(MODULE_NAME "Freeing hashset, elements: %u, capacity: %u\n", hs->count, hs->capacity);
|
450
|
448
|
free(hs->keys);
|
451
|
449
|
free(hs->bitmap);
|
...
|
...
|
@@ -560,7 +558,7 @@ ssize_t cli_hashset_toarray(const struct cli_hashset* hs, uint32_t** array)
|
560
|
560
|
|
561
|
561
|
void cli_hashset_init_noalloc(struct cli_hashset *hs)
|
562
|
562
|
{
|
563
|
|
- memset(hs, 0, sizeof(hs));
|
|
563
|
+ memset(hs, 0, sizeof(*hs));
|
564
|
564
|
}
|
565
|
565
|
|
566
|
566
|
int cli_hashset_contains_maybe_noalloc(const struct cli_hashset *hs, const uint32_t key)
|