diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-06-04 19:58:18 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-06-24 10:38:15 +0200 |
commit | b8b46b1ce5e1528522c3ebb752721f0bc3250961 (patch) | |
tree | 982f2454d011da102ab5b3e87971a74470f1d320 /src/basic/hashmap.c | |
parent | basic/set: add set_ensure_consume() (diff) | |
download | systemd-b8b46b1ce5e1528522c3ebb752721f0bc3250961.tar.xz systemd-b8b46b1ce5e1528522c3ebb752721f0bc3250961.zip |
basic/set,hashmap: pass through allocation info in more cases
Diffstat (limited to 'src/basic/hashmap.c')
-rw-r--r-- | src/basic/hashmap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c index ae3235d518..b98696a136 100644 --- a/src/basic/hashmap.c +++ b/src/basic/hashmap.c @@ -1789,10 +1789,10 @@ int set_consume(Set *s, void *value) { return r; } -int hashmap_put_strdup(Hashmap **h, const char *k, const char *v) { +int _hashmap_put_strdup(Hashmap **h, const char *k, const char *v HASHMAP_DEBUG_PARAMS) { int r; - r = hashmap_ensure_allocated(h, &string_hash_ops_free_free); + r = _hashmap_ensure_allocated(h, &string_hash_ops_free_free HASHMAP_DEBUG_PASS_ARGS); if (r < 0) return r; @@ -1823,14 +1823,14 @@ int hashmap_put_strdup(Hashmap **h, const char *k, const char *v) { return r; } -int set_put_strdup(Set **s, const char *p) { +int _set_put_strdup(Set **s, const char *p HASHMAP_DEBUG_PARAMS) { char *c; int r; assert(s); assert(p); - r = set_ensure_allocated(s, &string_hash_ops_free); + r = _set_ensure_allocated(s, &string_hash_ops_free HASHMAP_DEBUG_PASS_ARGS); if (r < 0) return r; @@ -1844,14 +1844,14 @@ int set_put_strdup(Set **s, const char *p) { return set_consume(*s, c); } -int set_put_strdupv(Set **s, char **l) { +int _set_put_strdupv(Set **s, char **l HASHMAP_DEBUG_PARAMS) { int n = 0, r; char **i; assert(s); STRV_FOREACH(i, l) { - r = set_put_strdup(s, *i); + r = _set_put_strdup(s, *i HASHMAP_DEBUG_PASS_ARGS); if (r < 0) return r; |