diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-05-27 14:17:43 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-05-27 16:48:04 +0200 |
commit | 9ff7c5b031fb95783884f1e755b5875712f46ea5 (patch) | |
tree | 44bee256dbd765cdbfd6521ed550e0f3adb2c08b /src/basic/hashmap.c | |
parent | 49d5aae503f86c61c9e8325c86494431fcf8ca98 (diff) | |
download | systemd-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.c | 2 |
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) { |