From 3a545fd041cbfb242d8457f55a4e9f9295d41f61 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 1 Apr 2022 21:25:55 +0200 Subject: [PATCH] platform: use nm_utils_ip4_address_clear_host_address() We have this util function, presumably because it's good to have it. Use it. --- src/libnm-platform/nm-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c index 10bc55d000..112b9d5df6 100644 --- a/src/libnm-platform/nm-platform.c +++ b/src/libnm-platform/nm-platform.c @@ -7988,8 +7988,8 @@ nm_platform_ip4_address_pretty_sort_cmp(const NMPlatformIP4Address *a1, * subnet (and thus also the primary/secondary role) is * preserved. */ - n1 = a1->address & _nm_utils_ip4_prefix_to_netmask(a1->plen); - n2 = a2->address & _nm_utils_ip4_prefix_to_netmask(a2->plen); + n1 = nm_utils_ip4_address_clear_host_address(a1->address, a1->plen); + n2 = nm_utils_ip4_address_clear_host_address(a2->address, a2->plen); NM_CMP_DIRECT_MEMCMP(&n1, &n2, sizeof(guint32)); return 0; }