summaryrefslogtreecommitdiff
path: root/src/set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/set.c')
-rw-r--r--src/set.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/set.c b/src/set.c
index e2baaed..2d748cd 100644
--- a/src/set.c
+++ b/src/set.c
@@ -1,4 +1,4 @@
-#include "config.h"
+#include <s.h>
#include <assert.h>
#include <errno.h>
@@ -8,13 +8,11 @@
#include <stdint.h>
#include <string.h>
-#include <endiannessbs.h>
-#include <siphashbs.h>
+#include <endianness.h>
#include "hash.h"
#include "logerr.h"
#include "tree.h"
-#include "util.h"
#include "vector.h"
#include "set.h"
@@ -73,7 +71,8 @@ out:
vector_free(&table);
}
if (ret != NULL) {
- freeit((void *)&ret);
+ free((struct Set *)ret);
+ ret = NULL;
}
}
return rc;
@@ -84,7 +83,8 @@ set_free(const struct Set **const s) {
assert((*s) != NULL);
const struct Vector *table = (*s)->table;
vector_free(&table);
- freeit((void *)s);
+ free((struct Set *)*s);
+ *s = NULL;
}
int
@@ -94,7 +94,7 @@ set_add(const struct Set *const s, const void *const value) {
uint8_t hash_bytes[HASH_OUTPUT_LENGTH];
hash(s->value_size, value, hash_bytes);
- const uint64_t hash_value = endiannessbs_from_le64(hash_bytes);
+ const uint64_t hash_value = endianness_from_le64(hash_bytes);
const size_t idx = hash_value % vector_capacity(s->table);
const struct Tree *slot;