summaryrefslogtreecommitdiff
path: root/src/basic/hashmap.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-27 14:17:43 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-27 16:48:04 +0200
commit9ff7c5b031fb95783884f1e755b5875712f46ea5 (patch)
tree44bee256dbd765cdbfd6521ed550e0f3adb2c08b /src/basic/hashmap.c
parent49d5aae503f86c61c9e8325c86494431fcf8ca98 (diff)
downloadsystemd-9ff7c5b031fb95783884f1e755b5875712f46ea5.tar.gz
basic/hashmap: make _ensure_allocated return 1 on actual allocations
Also, make test_hashmap_ensure_allocated() actually test hashmap_ensure_allocated().
Diffstat (limited to 'src/basic/hashmap.c')
-rw-r--r--src/basic/hashmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c
index efbe95bb9e..b45938cd3b 100644
--- a/src/basic/hashmap.c
+++ b/src/basic/hashmap.c
@@ -835,7 +835,7 @@ static int hashmap_base_ensure_allocated(HashmapBase **h, const struct hash_ops
return -ENOMEM;
*h = q;
- return 0;
+ return 1;
}
int internal_hashmap_ensure_allocated(Hashmap **h, const struct hash_ops *hash_ops HASHMAP_DEBUG_PARAMS) {