summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;