From 6aed608011d84d87c8bf96f3c73db8806c6a739a Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 18 Sep 2017 11:38:18 +0200 Subject: [PATCH] libnm-core: sort attribute names for nm_ip_route_get_attribute_names() The function shall return the attribute names in a consistent order. Let's sort by name. --- libnm-core/nm-setting-ip-config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libnm-core/nm-setting-ip-config.c b/libnm-core/nm-setting-ip-config.c index 2a8f38f839..3ab159b097 100644 --- a/libnm-core/nm-setting-ip-config.c +++ b/libnm-core/nm-setting-ip-config.c @@ -1128,6 +1128,7 @@ nm_ip_route_get_attribute_names (NMIPRoute *route) while (g_hash_table_iter_next (&iter, (gpointer *) &key, NULL)) g_ptr_array_add (names, g_strdup (key)); } + g_ptr_array_sort (names, nm_strcmp_p); g_ptr_array_add (names, NULL); return (char **) g_ptr_array_free (names, FALSE);