summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-07-07 17:26:54 +0200
committerThomas Haller <thaller@redhat.com>2015-07-07 17:29:05 +0200
commitce9d8e0817023265b615f9ef13b0d989de0ac340 (patch)
tree3730751b2ea78e23d75dc1efa6507bc4c786c3a5
parent08b99eea10500e9418d619c531de87864069c1e2 (diff)
downloadNetworkManager-ce9d8e0817023265b615f9ef13b0d989de0ac340.tar.gz
route-manager/trivial: move code
Have related functions closer together. Fixes: 635eea60cfb340cbefec67732467f9075e7dc6c2
-rw-r--r--src/nm-route-manager.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/nm-route-manager.c b/src/nm-route-manager.c
index e4d18d3428..c38b0bc863 100644
--- a/src/nm-route-manager.c
+++ b/src/nm-route-manager.c
@@ -225,6 +225,18 @@ _v4_route_dest_cmp (const NMPlatformIP4Route *r1, const NMPlatformIP4Route *r2)
}
static int
+_v6_route_dest_cmp (const NMPlatformIP6Route *r1, const NMPlatformIP6Route *r2)
+{
+ struct in6_addr n1, n2;
+
+ CMP_AND_RETURN_INT (r1->plen, r2->plen);
+
+ nm_utils_ip6_address_clear_host_address (&n1, &r1->network, r1->plen);
+ nm_utils_ip6_address_clear_host_address (&n2, &r2->network, r2->plen);
+ return memcmp (&n1, &n2, sizeof (n1));
+}
+
+static int
_v4_route_id_cmp (const NMPlatformIP4Route *r1, const NMPlatformIP4Route *r2)
{
CMP_AND_RETURN_INT (r1->plen, r2->plen);
@@ -253,18 +265,6 @@ _v6_route_id_cmp (const NMPlatformIP6Route *r1, const NMPlatformIP6Route *r2)
return 0;
}
-static int
-_v6_route_dest_cmp (const NMPlatformIP6Route *r1, const NMPlatformIP6Route *r2)
-{
- struct in6_addr n1, n2;
-
- CMP_AND_RETURN_INT (r1->plen, r2->plen);
-
- nm_utils_ip6_address_clear_host_address (&n1, &r1->network, r1->plen);
- nm_utils_ip6_address_clear_host_address (&n2, &r2->network, r2->plen);
- return memcmp (&n1, &n2, sizeof (n1));
-}
-
/*********************************************************************************************/
static int