summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarson Fleming <[email protected]>2026-02-01 04:13:25 -0500
committerCarson Fleming <[email protected]>2026-02-01 04:13:25 -0500
commitbc002b326f3b2024ebb46ee195f00a6c46453f2e (patch)
treeef9948c243e4a28d09039691c56f1d879c738193
parent1ab4f55dfa898b0929bbb3c5ead76337b920d0bf (diff)
downloadsafec-bc002b326f3b2024ebb46ee195f00a6c46453f2e.tar.gz
lose assert.h
-rw-r--r--map.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/map.c b/map.c
index a34def4..42882d0 100644
--- a/map.c
+++ b/map.c
@@ -1,7 +1,6 @@
#include "map.h"
#include "crash.h"
#include <stdlib.h>
-#include <assert.h>
#define DEFAULT_CAPACITY 16
@@ -81,7 +80,7 @@ void* map_get_or_default(const map_t* map, const void* key, void* default_val) {
static void insert_entry(map_t* map, struct __map_entry* entry) {
struct __map_entry* slot = fetch_entry(map, entry->key);
- assert(slot->next == NULL);
+ if (slot->next != NULL) crash("Hash map internals are corrupted\n");
slot->key = entry->key;
slot->value = entry->value;
slot->next = entry;