summaryrefslogtreecommitdiff
path: root/src/basic/hash-funcs.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-05-26 21:40:43 +0200
committerLennart Poettering <lennart@poettering.net>2021-05-26 21:44:36 +0200
commit74bbc85ca68e2845534620bd0e60c9a6ee152c06 (patch)
treeb504f578ae3eaf1e04c81a3f7556d1da9bff33f0 /src/basic/hash-funcs.c
parent730b9c1e1469dfd6d6850e9ea06da3cac469eba0 (diff)
downloadsystemd-74bbc85ca68e2845534620bd0e60c9a6ee152c06.tar.gz
hash-func: change value type of string_hash_ops_free_free to void*
The generic string_hash_ops_free_free hash operations vtable currently assumes the data pointer is of type char*. There's really no reason to assume that though, we regularly store non-string data as value in a hashmap. Hence, to accomodate for that, use void* as pointer for the value (and keep char* for the key, as that's what string_hash_ops_free_free is for, after all).
Diffstat (limited to 'src/basic/hash-funcs.c')
-rw-r--r--src/basic/hash-funcs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/hash-funcs.c b/src/basic/hash-funcs.c
index d88df65a0d..608131a1c1 100644
--- a/src/basic/hash-funcs.c
+++ b/src/basic/hash-funcs.c
@@ -14,7 +14,7 @@ DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR(string_hash_ops_free,
char, string_hash_func, string_compare_func, free);
DEFINE_HASH_OPS_FULL(string_hash_ops_free_free,
char, string_hash_func, string_compare_func, free,
- char, free);
+ void, free);
void path_hash_func(const char *q, struct siphash *state) {
size_t n;