diff options
| author | Thomas Haller <thaller@redhat.com> | 2017-02-03 15:38:58 +0100 |
|---|---|---|
| committer | Thomas Haller <thaller@redhat.com> | 2017-02-10 14:43:24 +0100 |
| commit | eb5ceedbba87e5ea4d2b32ecc3e84f930c3d9835 (patch) | |
| tree | 604054eb45c2ecb86669b96b185f47ac876e9aef /src/tests | |
| parent | f3504c9bc214aa32f7a498a1adb48b840be8809a (diff) | |
| download | NetworkManager-eb5ceedbba87e5ea4d2b32ecc3e84f930c3d9835.tar.gz | |
core: add nm_utils_cmp_connection_by_autoconnect_priority_p_with_data() function
Have a proper cmp() function and a wrapper *_p_with_data() that can be
used for g_qsort_with_data().
Thus, establish a naming scheme (*_p_with_data()) for these compare
wrappers that we need all over the place. Note, we also have
nm_strcmp_p_with_data() for the same reason and later more such
functions will follow.
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/test-general.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/test-general.c b/src/tests/test-general.c index 81d8e05c1e..f8f8fa2606 100644 --- a/src/tests/test-general.c +++ b/src/tests/test-general.c @@ -892,12 +892,12 @@ _test_connection_sort_autoconnect_priority_one (NMConnection **list, gboolean sh } /* sort it... */ - g_ptr_array_sort (connections, (GCompareFunc) nm_utils_cmp_connection_by_autoconnect_priority); + g_ptr_array_sort_with_data (connections, nm_utils_cmp_connection_by_autoconnect_priority_p_with_data, NULL); for (i = 0; i < count; i++) { if (list[i] == connections->pdata[i]) continue; - if (shuffle && nm_utils_cmp_connection_by_autoconnect_priority (&list[i], (NMConnection **) &connections->pdata[i]) == 0) + if (shuffle && nm_utils_cmp_connection_by_autoconnect_priority (list[i], connections->pdata[i]) == 0) continue; g_message ("After sorting, the order of connections is not as expected!! Offending index: %d", i); for (j = 0; j < count; j++) |
