]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Remove path_compare_func() alias for path_compare()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Nov 2019 14:23:05 +0000 (15:23 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 15 Nov 2019 13:47:45 +0000 (14:47 +0100)
Non sunt multiplicanda entia sine necessitate.

src/basic/hash-funcs.c
src/basic/hash-funcs.h
src/cgtop/cgtop.c

index 11cd371fad4217bdabb545dfe779bfdbca539435..fce339512c6abe547d1133aaeb0658a7c25e14ae 100644 (file)
@@ -52,11 +52,7 @@ void path_hash_func(const char *q, struct siphash *state) {
         }
 }
 
-int path_compare_func(const char *a, const char *b) {
-        return path_compare(a, b);
-}
-
-DEFINE_HASH_OPS(path_hash_ops, char, path_hash_func, path_compare_func);
+DEFINE_HASH_OPS(path_hash_ops, char, path_hash_func, path_compare);
 
 void trivial_hash_func(const void *p, struct siphash *state) {
         siphash24_compress(&p, sizeof(p), state);
index 0d2d42838930a64cc4f9539c55714cd98da74249..7bb5d1cd0217ff6c82730c1d9269d710f239be70 100644 (file)
@@ -79,7 +79,6 @@ extern const struct hash_ops string_hash_ops;
 extern const struct hash_ops string_hash_ops_free_free;
 
 void path_hash_func(const char *p, struct siphash *state);
-int path_compare_func(const char *a, const char *b) _pure_;
 extern const struct hash_ops path_hash_ops;
 
 /* This will compare the passed pointers directly, and will not dereference them. This is hence not useful for strings
index 2494c70238cc9a18d9372aa71d0d872e648975a7..de25aaae5d1db02df04b08a60596ab30e139eb6d 100644 (file)
@@ -897,7 +897,7 @@ static const char* counting_what(void) {
                 return "userspace processes (excl. kernel)";
 }
 
-DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(group_hash_ops, char, path_hash_func, path_compare_func, Group, group_free);
+DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(group_hash_ops, char, path_hash_func, path_compare, Group, group_free);
 
 static int run(int argc, char *argv[]) {
         _cleanup_hashmap_free_ Hashmap *a = NULL, *b = NULL;