mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 21:40:22 +01:00
route-manager/trivial: move code
Have related functions closer together. Fixes:635eea60cf(cherry picked from commitce9d8e0817)
This commit is contained in:
parent
ca861152b5
commit
e3bd4e1d44
1 changed files with 12 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue