basic/hashmap: make _ensure_allocated return 1 on actual allocations
Also, make test_hashmap_ensure_allocated() actually test hashmap_ensure_allocated().
This commit is contained in:
+1
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user