diff options
| -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; |
