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-Url: http://git.ipfire.org/?p=people%2Fms%2Fsystemd.git;a=commitdiff_plain;h=48507e6621596b0d5503fad6cd9e0685917603f5 hashmap: allow callers distinguish whether hashmap_put() was a nop or not --- diff --git a/hashmap.c b/hashmap.c index 2102db8..5a993b6 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) {