diff options
| author | Carson Fleming <[email protected]> | 2026-02-01 04:13:25 -0500 |
|---|---|---|
| committer | Carson Fleming <[email protected]> | 2026-02-01 04:13:25 -0500 |
| commit | bc002b326f3b2024ebb46ee195f00a6c46453f2e (patch) | |
| tree | ef9948c243e4a28d09039691c56f1d879c738193 | |
| parent | 1ab4f55dfa898b0929bbb3c5ead76337b920d0bf (diff) | |
| download | safec-bc002b326f3b2024ebb46ee195f00a6c46453f2e.tar.gz | |
lose assert.h
| -rw-r--r-- | map.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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; |
