diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-05-28 17:27:11 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-05-30 11:40:53 +0200 |
commit | 856e51957a9c67db84d1812ad3435027715fce89 (patch) | |
tree | b80eee1e6944d9cf5b1946f95f9608b254a28924 /src/basic | |
parent | basic/hashmap,set: change "internal_" to "_" as the prefix (diff) | |
download | systemd-856e51957a9c67db84d1812ad3435027715fce89.tar.xz systemd-856e51957a9c67db84d1812ad3435027715fce89.zip |
strv: propagate location info from the call site too
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/strv.c | 8 | ||||
-rw-r--r-- | src/basic/strv.h | 6 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/basic/strv.c b/src/basic/strv.c index f1d2bb5190..858e1e62ec 100644 --- a/src/basic/strv.c +++ b/src/basic/strv.c @@ -946,20 +946,20 @@ static int string_strv_hashmap_put_internal(Hashmap *h, const char *key, const c return 1; } -int string_strv_hashmap_put(Hashmap **h, const char *key, const char *value) { +int _string_strv_hashmap_put(Hashmap **h, const char *key, const char *value HASHMAP_DEBUG_PARAMS) { int r; - r = hashmap_ensure_allocated(h, &string_strv_hash_ops); + r = _hashmap_ensure_allocated(h, &string_strv_hash_ops HASHMAP_DEBUG_PASS_ARGS); if (r < 0) return r; return string_strv_hashmap_put_internal(*h, key, value); } -int string_strv_ordered_hashmap_put(OrderedHashmap **h, const char *key, const char *value) { +int _string_strv_ordered_hashmap_put(OrderedHashmap **h, const char *key, const char *value HASHMAP_DEBUG_PARAMS) { int r; - r = ordered_hashmap_ensure_allocated(h, &string_strv_hash_ops); + r = _ordered_hashmap_ensure_allocated(h, &string_strv_hash_ops HASHMAP_DEBUG_PASS_ARGS); if (r < 0) return r; diff --git a/src/basic/strv.h b/src/basic/strv.h index 0f81e34580..2ad927bce5 100644 --- a/src/basic/strv.h +++ b/src/basic/strv.h @@ -226,5 +226,7 @@ int fputstrv(FILE *f, char * const *l, const char *separator, bool *space); }) extern const struct hash_ops string_strv_hash_ops; -int string_strv_hashmap_put(Hashmap **h, const char *key, const char *value); -int string_strv_ordered_hashmap_put(OrderedHashmap **h, const char *key, const char *value); +int _string_strv_hashmap_put(Hashmap **h, const char *key, const char *value HASHMAP_DEBUG_PARAMS); +int _string_strv_ordered_hashmap_put(OrderedHashmap **h, const char *key, const char *value HASHMAP_DEBUG_PARAMS); +#define string_strv_hashmap_put(h, k, v) _string_strv_hashmap_put(h, k, v HASHMAP_DEBUG_SRC_ARGS) +#define string_strv_ordered_hashmap_put(h, k, v) _string_strv_ordered_hashmap_put(h, k, v HASHMAP_DEBUG_SRC_ARGS) |