mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-27 05:50:32 +01:00
platform: make "idx" argument in _addr_array_clean_expired() mandatory
There is only one caller of _addr_array_clean_expired(), and it always
provides the "idx" pointer.
(cherry picked from commit de9f174d51)
This commit is contained in:
parent
cfa73df3a3
commit
160d7c0a77
1 changed files with 6 additions and 7 deletions
|
|
@ -3742,14 +3742,13 @@ _addr_array_clean_expired(int addr_family,
|
|||
if (!nmp_utils_lifetime_get(a->timestamp, a->lifetime, a->preferred, cached_now, NULL))
|
||||
goto clear_and_next;
|
||||
|
||||
if (idx) {
|
||||
if (G_UNLIKELY(!*idx)) {
|
||||
*idx = g_hash_table_new((GHashFunc) nmp_object_id_hash,
|
||||
(GEqualFunc) nmp_object_id_equal);
|
||||
}
|
||||
if (!g_hash_table_add(*idx, (gpointer) NMP_OBJECT_UP_CAST(a)))
|
||||
nm_assert_not_reached();
|
||||
if (G_UNLIKELY(!*idx)) {
|
||||
*idx =
|
||||
g_hash_table_new((GHashFunc) nmp_object_id_hash, (GEqualFunc) nmp_object_id_equal);
|
||||
}
|
||||
if (!g_hash_table_add(*idx, (gpointer) NMP_OBJECT_UP_CAST(a)))
|
||||
nm_assert_not_reached();
|
||||
|
||||
any_addrs = TRUE;
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue