diff options
author | Thomas Haller <thaller@redhat.com> | 2022-05-02 13:10:24 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-05-03 10:19:11 +0200 |
commit | 34ce3421868b9ef55aea0d6b18dfa8a008c4fdc4 (patch) | |
tree | 202306d8e9c14ef93b6c9a09a41893b7304be5f3 | |
parent | 53a67570e696323fbf70d61d83ae7ca406915b8b (diff) |
platform: simplify loop for IPv6 addresses in nm_platform_ip_address_sync()
(cherry picked from commit 9b930cd96275869bab573ab9bc60febb8d3371ce)
-rw-r--r-- | src/libnm-platform/nm-platform.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c index 806466b51e..84345b3c91 100644 --- a/src/libnm-platform/nm-platform.c +++ b/src/libnm-platform/nm-platform.c @@ -4326,7 +4326,6 @@ nm_platform_ip_address_sync(NMPlatform *self, } if (!delete_remaining_addrs) { - delete_remaining_addrs = TRUE; while (i_know > 0) { const NMPlatformIP6Address *know_addr = NMP_OBJECT_CAST_IP6_ADDRESS(known_addresses->pdata[--i_know]); @@ -4341,14 +4340,14 @@ nm_platform_ip_address_sync(NMPlatform *self, if (IN6_ARE_ADDR_EQUAL(&plat_addr->address, &know_addr->address)) { /* we have a match. Mark address as handled. */ - delete_remaining_addrs = FALSE; goto next_plat; } - /* plat_address has no match. Now delete_remaining_addrs is TRUE and we will - * delete all the remaining addresses with cur_scope. */ + /* "plat_address" has no match. "delete_remaining_addrs" will be set to TRUE and we will + * delete all the remaining addresses with "cur_scope". */ break; } + delete_remaining_addrs = TRUE; } g_hash_table_add(_plat_addrs_to_delete_ensure(&plat_addrs_to_delete), |