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: 0.git+20100605+dfd8ee-1~95 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48507e6621596b0d5503fad6cd9e0685917603f5;p=systemd hashmap: allow callers distinguish whether hashmap_put() was a nop or not --- diff --git a/hashmap.c b/hashmap.c index 2102db8b..5a993b6e 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) {