diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 4dd4f3691de..37c5c3cc6c6 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -316,16 +316,6 @@ 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); -bool address_equal(const Address *a1, const Address *a2) { - if (a1 == a2) - return true; - - if (!a1 || !a2) - return false; - - return address_compare_func(a1, a2) == 0; -} - int address_dup(const Address *src, Address **ret) { _cleanup_(address_freep) Address *dest = NULL; int r; diff --git a/src/network/networkd-address.h b/src/network/networkd-address.h index 0f291ba7f6d..67b7580be67 100644 --- a/src/network/networkd-address.h +++ b/src/network/networkd-address.h @@ -63,7 +63,6 @@ Address* address_free(Address *address); int address_get(Link *link, const Address *in, Address **ret); int address_configure_handler_internal(sd_netlink *rtnl, sd_netlink_message *m, Link *link, const char *error_msg); int address_remove(Address *address); -bool address_equal(const Address *a1, const Address *a2); int address_dup(const Address *src, Address **ret); bool address_is_ready(const Address *a); void address_set_broadcast(Address *a); diff --git a/src/network/test-network.c b/src/network/test-network.c index 49a332a7f9f..8eb59b1cedb 100644 --- a/src/network/test-network.c +++ b/src/network/test-network.c @@ -170,6 +170,16 @@ static int test_load_config(Manager *manager) { return 0; } +static bool address_equal(const Address *a1, const Address *a2) { + if (a1 == a2) + return true; + + if (!a1 || !a2) + return false; + + return address_compare_func(a1, a2) == 0; +} + static void test_address_equality(void) { _cleanup_(address_freep) Address *a1 = NULL, *a2 = NULL;