mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 04:00:17 +01:00
all: remove unneessary cases from nm_utils_strv_equal()/nm_utils_strv_cmp_n()
This commit is contained in:
parent
251ba8ea44
commit
ef9510e30c
4 changed files with 5 additions and 5 deletions
|
|
@ -330,7 +330,7 @@ _do_test_nm_utils_strsplit_set_f_one(NMUtilsStrsplitSetFlags flags,
|
|||
}
|
||||
g_assert(words_g[words_len] == NULL);
|
||||
g_assert_cmpint(NM_PTRARRAY_LEN(words_g), ==, words_len);
|
||||
g_assert(nm_utils_strv_cmp_n(exp_words, words_len, NM_CAST_STRV_CC(words_g), -1) == 0);
|
||||
g_assert(nm_utils_strv_cmp_n(exp_words, words_len, words_g, -1) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -10058,7 +10058,7 @@ _strsplit_quoted_assert_strv(const char * topic,
|
|||
g_assert(strv1);
|
||||
g_assert(strv2);
|
||||
|
||||
if (nm_utils_strv_equal((char **) strv1, (char **) strv2))
|
||||
if (nm_utils_strv_equal(strv1, strv2))
|
||||
return;
|
||||
|
||||
for (i = 0; strv1[i]; i++) {
|
||||
|
|
|
|||
|
|
@ -1051,7 +1051,7 @@ test_strv_dup_packed(void)
|
|||
g_assert(strv_cpy);
|
||||
g_assert(NM_PTRARRAY_LEN(strv_cpy) == strv_len);
|
||||
if (strv_cpy)
|
||||
g_assert(nm_utils_strv_equal((char **) strv_cpy, (char **) strv_src));
|
||||
g_assert(nm_utils_strv_equal(strv_cpy, strv_src));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ set_arp_targets(NMDevice *device, const char *cur_arp_ip_target, const char *new
|
|||
if (cur_len == 0 && new_len == 0)
|
||||
return;
|
||||
|
||||
if (nm_utils_strv_equal((char **) cur_strv, (char **) new_strv))
|
||||
if (nm_utils_strv_equal(cur_strv, new_strv))
|
||||
return;
|
||||
|
||||
for (i = 0; i < cur_len; i++)
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ nm_wifi_p2p_peer_update_from_properties(NMWifiP2PPeer *peer, const NMSupplicantP
|
|||
|
||||
/* We currently only use the groups information internally to check if
|
||||
* the peer is still joined. */
|
||||
if (!nm_utils_strv_equal((char **) priv->groups, (char **) peer_info->groups)) {
|
||||
if (!nm_utils_strv_equal(priv->groups, peer_info->groups)) {
|
||||
g_free(priv->groups);
|
||||
priv->groups = nm_utils_strv_dup_packed(peer_info->groups, -1);
|
||||
changed |= TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue