]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: address_equal() is not used anymore, hence move it to test-network.c
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 8 Sep 2021 02:32:40 +0000 (11:32 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 24 Sep 2021 12:46:36 +0000 (21:46 +0900)
src/network/networkd-address.c
src/network/networkd-address.h
src/network/test-network.c

index 4dd4f3691ded6b8b0adbdbc121a0a64f3bb3ebdc..37c5c3cc6c67b1fc743c6a8d5ee98cdcc28c3615 100644 (file)
@@ -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;
index 0f291ba7f6dd28e886bb55c488a066259cd8685e..67b7580be67c8cda1071d38d670ad544fe1b5d7c 100644 (file)
@@ -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);
index 49a332a7f9f51a069b5372a62cede29f3fec9379..8eb59b1cedb077d04b19b9bd2feae989e0434f06 100644 (file)
@@ -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;