From 0869289348bdd8206d0128b720507ffb857459a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 17 Feb 2016 10:49:32 +0100 Subject: map: set errno to EEXIST when trying to map_put a duplicate value --- map.c | 1 + 1 file changed, 1 insertion(+) diff --git a/map.c b/map.c index cff659e..48590b3 100644 --- a/map.c +++ b/map.c @@ -113,6 +113,7 @@ bool map_put(Map *map, const char *k, const void *value) if (key[byte_num] == '\0') { /* All identical! */ free(key); + errno = EEXIST; return false; } } -- cgit v1.2.3