summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-11-15 16:06:43 +0100
committerThomas Haller <thaller@redhat.com>2017-11-16 11:49:52 +0100
commit93adadbdcbbccfeafb8523b129f103bb5b23f7d5 (patch)
treeba659102aeb347cb6c8689713aa15e7e2d052068 /clients
parentb58481b31ec5785d208a7b11df5b05fc50c158e2 (diff)
downloadNetworkManager-93adadbdcbbccfeafb8523b129f103bb5b23f7d5.tar.gz
all: use nm_direct_hash() instead of g_direct_hash()
We also do this for libnm, where it causes visible changes in behavior. But if somebody would rely on the hashing implementation for hash tables, it would be seriously flawed.
Diffstat (limited to 'clients')
-rw-r--r--clients/cli/connections.c2
-rw-r--r--clients/common/tests/test-general.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 91f96b262c..f34eec8fc9 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -3308,7 +3308,7 @@ _dynamic_options_set (const NMMetaAbstractInfo *abstract_info,
PropertyInfFlags v, v2;
if (G_UNLIKELY (!cache))
- cache = g_hash_table_new (NULL, NULL);
+ cache = g_hash_table_new (nm_direct_hash, NULL);
if (g_hash_table_lookup_extended (cache, (gpointer) abstract_info, NULL, &p))
v = GPOINTER_TO_UINT (p);
diff --git a/clients/common/tests/test-general.c b/clients/common/tests/test-general.c
index e6a06ca535..77ff4cea33 100644
--- a/clients/common/tests/test-general.c
+++ b/clients/common/tests/test-general.c
@@ -102,7 +102,7 @@ test_client_meta_check (void)
if (info->valid_parts) {
gsize i, l;
- gs_unref_hashtable GHashTable *dup = g_hash_table_new (NULL, NULL);
+ gs_unref_hashtable GHashTable *dup = g_hash_table_new (nm_direct_hash, NULL);
l = NM_PTRARRAY_LEN (info->valid_parts);
g_assert (l >= 2);