route-manager/trivial: move code

Have related functions closer together.

Fixes: 635eea60cf
(cherry picked from commit ce9d8e0817)
This commit is contained in:
Thomas Haller 2015-07-07 17:26:54 +02:00
parent ca861152b5
commit e3bd4e1d44

View file

@ -224,6 +224,18 @@ _v4_route_dest_cmp (const NMPlatformIP4Route *r1, const NMPlatformIP4Route *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
_v4_route_id_cmp (const NMPlatformIP4Route *r1, const NMPlatformIP4Route *r2)
{
@ -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