From ce9d8e0817023265b615f9ef13b0d989de0ac340 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 7 Jul 2015 17:26:54 +0200 Subject: [PATCH] route-manager/trivial: move code Have related functions closer together. Fixes: 635eea60cfb340cbefec67732467f9075e7dc6c2 --- src/nm-route-manager.c | 24 ++++++++++++------------ 1 file 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 @@ -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