]> err.no Git - systemd/commitdiff
hashmap: allow callers distinguish whether hashmap_put() was a nop or not
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Apr 2010 03:32:51 +0000 (05:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 21 Apr 2010 03:32:51 +0000 (05:32 +0200)
hashmap.c

index 2102db8b263c79405514a353e4ac60dc207504ce..5a993b6e4761a36ba410c1f9b1cbba7a5de95a58 100644 (file)
--- 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) {