From: Lennart Poettering Date: Wed, 21 Apr 2010 03:32:51 +0000 (+0200) Subject: hashmap: allow callers distinguish whether hashmap_put() was a nop or not X-Git-Tag: v1~492 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=48507e6621596b0d5503fad6cd9e0685917603f5;p=elogind.git hashmap: allow callers distinguish whether hashmap_put() was a nop or not --- 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) {