From 48507e6621596b0d5503fad6cd9e0685917603f5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 21 Apr 2010 05:32:51 +0200 Subject: [PATCH 1/1] hashmap: allow callers distinguish whether hashmap_put() was a nop or not --- hashmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hashmap.c b/hashmap.c index 2102db8b2..5a993b6e4 100644 --- a/hashmap.c +++ b/hashmap.c @@ -217,7 +217,7 @@ int hashmap_put(Hashmap *h, const void *key, void *value) { link_entry(h, e, hash); - return 0; + return 1; } int hashmap_replace(Hashmap *h, const void *key, void *value) { -- 2.30.2