mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 04:00:09 +01:00
shared,libnm-core: use nm_utils_named_value_list_sort()
This commit is contained in:
parent
6d472dacb4
commit
2f9e55ee52
3 changed files with 2 additions and 9 deletions
|
|
@ -851,8 +851,7 @@ _nm_utils_strdict_to_dbus (const GValue *prop_value)
|
|||
} while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &value));
|
||||
nm_assert (i == len);
|
||||
|
||||
g_qsort_with_data (idx, len, sizeof (idx[0]),
|
||||
nm_utils_named_entry_cmp_with_data, NULL);
|
||||
nm_utils_named_value_list_sort (idx, len, NULL, NULL);
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
g_variant_builder_add (&builder, "{ss}", idx[i].name, idx[i].value_str);
|
||||
|
|
|
|||
|
|
@ -2156,10 +2156,7 @@ nm_utils_named_values_from_str_dict (GHashTable *hash, guint *out_len)
|
|||
values[i].name = NULL;
|
||||
values[i].value_ptr = NULL;
|
||||
|
||||
if (len > 1) {
|
||||
g_qsort_with_data (values, len, sizeof (values[0]),
|
||||
nm_utils_named_entry_cmp_with_data, NULL);
|
||||
}
|
||||
nm_utils_named_value_list_sort (values, len, NULL, NULL);
|
||||
|
||||
NM_SET_OUT (out_len, len);
|
||||
return values;
|
||||
|
|
|
|||
|
|
@ -906,9 +906,6 @@ typedef struct {
|
|||
};
|
||||
} NMUtilsNamedValue;
|
||||
|
||||
#define nm_utils_named_entry_cmp nm_strcmp_p
|
||||
#define nm_utils_named_entry_cmp_with_data nm_strcmp_p_with_data
|
||||
|
||||
NMUtilsNamedValue *nm_utils_named_values_from_str_dict (GHashTable *hash, guint *out_len);
|
||||
|
||||
gssize nm_utils_named_value_list_find (const NMUtilsNamedValue *arr,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue