diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-09-15 16:43:59 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-09-15 16:43:59 -0400 |
commit | 7398282096ba4a74b11c18082cab7db32c2b0da1 (patch) | |
tree | 77eaf24ef7c223963ab4d498d5f350932b17ff6c /src/shared/conf-files.c | |
parent | 35257b404e1b449bcfbcbbf7dd4a713927bec8ed (diff) |
hashmap: introduce hash_ops to make struct Hashmap smaller
It is redundant to store 'hash' and 'compare' function pointers in
struct Hashmap separately. The functions always comprise a pair.
Store a single pointer to struct hash_ops instead.
systemd keeps hundreds of hashmaps, so this saves a little bit of
memory.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared/conf-files.c')
-rw-r--r-- | src/shared/conf-files.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/conf-files.c b/src/shared/conf-files.c index 6675a1c26c..c68f361136 100644 --- a/src/shared/conf-files.c +++ b/src/shared/conf-files.c @@ -107,7 +107,7 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const if (!path_strv_resolve_uniq(dirs, root)) return -ENOMEM; - fh = hashmap_new(string_hash_func, string_compare_func); + fh = hashmap_new(&string_hash_ops); if (!fh) return -ENOMEM; |