]> git.lizzy.rs Git - nothing.git/blobdiff - src/hashset.c
Add TODO(#854)
[nothing.git] / src / hashset.c
index 65abb42d3c75a788506de59bbd7c9037294bd119..50676726792c166e9e77046a043cc7cf45b7cd35 100644 (file)
@@ -33,11 +33,8 @@ static uint64_t fnv1(const char *data, size_t size)
 HashSet *create_hashset(size_t element_size, size_t n)
 {
     Lt *lt = create_lt();
-    if (lt == NULL) {
-        return NULL;
-    }
 
-    HashSet *hash_set = PUSH_LT(lt, nth_alloc(sizeof(HashSet)), free);
+    HashSet *hash_set = PUSH_LT(lt, nth_calloc(1, sizeof(HashSet)), free);
     if (hash_set == NULL) {
         RETURN_LT(lt, NULL);
     }