From: Yu Watanabe Date: Fri, 1 Oct 2021 00:03:18 +0000 (+0900) Subject: network: make several hash_ops static X-Git-Tag: v250-rc1~570^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6bf03f6f4a1d9b520454801c81576c1263caec4d;p=thirdparty%2Fsystemd.git network: make several hash_ops static --- diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index b308e9ee62b..aaacab9a945 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -314,7 +314,12 @@ int address_compare_func(const Address *a1, const Address *a2) { } } -DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR(address_hash_ops, Address, address_hash_func, address_compare_func, address_free); +DEFINE_PRIVATE_HASH_OPS_WITH_KEY_DESTRUCTOR( + address_hash_ops, + Address, + address_hash_func, + address_compare_func, + address_free); int address_dup(const Address *src, Address **ret) { _cleanup_(address_freep) Address *dest = NULL; diff --git a/src/network/networkd-address.h b/src/network/networkd-address.h index 67b7580be67..80ceda94279 100644 --- a/src/network/networkd-address.h +++ b/src/network/networkd-address.h @@ -97,7 +97,6 @@ void network_drop_invalid_addresses(Network *network); void address_hash_func(const Address *a, struct siphash *state); int address_compare_func(const Address *a1, const Address *a2); -extern const struct hash_ops address_hash_ops; DEFINE_NETWORK_CONFIG_STATE_FUNCTIONS(Address, address); static inline void address_enter_probing(Address *address) { diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 4979d83f6c3..6e6d6560339 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -1245,7 +1245,7 @@ static int ipv6_token_compare_func(const IPv6Token *a, const IPv6Token *b) { return memcmp(&a->prefix, &b->prefix, sizeof(struct in6_addr)); } -DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR( +DEFINE_PRIVATE_HASH_OPS_WITH_KEY_DESTRUCTOR( ipv6_token_hash_ops, IPv6Token, ipv6_token_hash_func, diff --git a/src/network/networkd-nexthop.c b/src/network/networkd-nexthop.c index d1ac730e15f..267efb56208 100644 --- a/src/network/networkd-nexthop.c +++ b/src/network/networkd-nexthop.c @@ -149,7 +149,7 @@ int nexthop_compare_func(const NextHop *a, const NextHop *b) { return 0; } -DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR( +DEFINE_PRIVATE_HASH_OPS_WITH_KEY_DESTRUCTOR( nexthop_hash_ops, NextHop, nexthop_hash_func, diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c index 009afa1b29f..f7ef657bcaa 100644 --- a/src/network/networkd-route.c +++ b/src/network/networkd-route.c @@ -394,7 +394,7 @@ int route_compare_func(const Route *a, const Route *b) { } } -DEFINE_HASH_OPS_WITH_KEY_DESTRUCTOR( +DEFINE_PRIVATE_HASH_OPS_WITH_KEY_DESTRUCTOR( route_hash_ops, Route, route_hash_func, diff --git a/src/network/networkd-route.h b/src/network/networkd-route.h index d3acdfa2e74..3e817de3ac3 100644 --- a/src/network/networkd-route.h +++ b/src/network/networkd-route.h @@ -67,7 +67,6 @@ typedef struct Route { void route_hash_func(const Route *route, struct siphash *state); int route_compare_func(const Route *a, const Route *b); -extern const struct hash_ops route_hash_ops; int route_new(Route **ret); Route *route_free(Route *route);