diff options
author | Thomas Haller <thaller@redhat.com> | 2018-03-25 14:16:17 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-03-27 09:58:00 +0200 |
commit | e49a32936c6b7544750e60c6ec0816049f8fdfb9 (patch) | |
tree | 886a18399ff81a192301e0252d978a80f4bba51e /src/dns/nm-dns-systemd-resolved.c | |
parent | cd48bc74b69794a1f60c2f08cc503f8ca43322ae (diff) | |
download | NetworkManager-e49a32936c6b7544750e60c6ec0816049f8fdfb9.tar.gz |
all: use nm_utils_hash_keys_to_array()
Diffstat (limited to 'src/dns/nm-dns-systemd-resolved.c')
-rw-r--r-- | src/dns/nm-dns-systemd-resolved.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/dns/nm-dns-systemd-resolved.c b/src/dns/nm-dns-systemd-resolved.c index 2e790d0b14..7da27e5f7f 100644 --- a/src/dns/nm-dns-systemd-resolved.c +++ b/src/dns/nm-dns-systemd-resolved.c @@ -330,14 +330,10 @@ update (NMDnsPlugin *plugin, free_pending_updates (self); - interfaces_keys = g_hash_table_get_keys_as_array (interfaces, &interfaces_len); - if (interfaces_len > 1) { - g_qsort_with_data (interfaces_keys, - interfaces_len, - sizeof (gpointer), - nm_cmp_int2ptr_p_with_data, - NULL); - } + interfaces_keys = nm_utils_hash_keys_to_array (interfaces, + nm_cmp_int2ptr_p_with_data, + NULL, + &interfaces_len); for (i = 0; i < interfaces_len; i++) { InterfaceConfig *ic = g_hash_table_lookup (interfaces, GINT_TO_POINTER (interfaces_keys[i])); |