diff options
author | Thomas Haller <thaller@redhat.com> | 2017-11-15 16:06:43 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-11-15 16:52:32 +0100 |
commit | db3240b97147068bff52f2ff140e3f0bb7f60767 (patch) | |
tree | d12849cb6147a3841d53648bd98252719f495324 /libnm-core/nm-setting.c | |
parent | 8e37d536bd01081487cbb61114f6fb4bd61c7baa (diff) | |
download | NetworkManager-th/nm-hash-all.tar.gz |
all: use nm_str_hash() instead of g_str_hash()th/nm-hash-all
We also do this for libnm and libnm-core, 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 'libnm-core/nm-setting.c')
-rw-r--r-- | libnm-core/nm-setting.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c index 9c8e53aeac..297887411d 100644 --- a/libnm-core/nm-setting.c +++ b/libnm-core/nm-setting.c @@ -95,7 +95,7 @@ _ensure_registered (void) { if (G_UNLIKELY (registered_settings == NULL)) { nm_g_type_init (); - registered_settings = g_hash_table_new (g_str_hash, g_str_equal); + registered_settings = g_hash_table_new (nm_str_hash, g_str_equal); registered_settings_by_type = g_hash_table_new (_nm_gtype_hash, _nm_gtype_equal); } } @@ -807,7 +807,7 @@ _nm_setting_new_from_dbus (GType setting_type, GVariant *entry, *entry_key; char *key; - keys = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + keys = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL); g_variant_iter_init (&iter, setting_dict); while ((entry = g_variant_iter_next_value (&iter))) { @@ -1359,7 +1359,7 @@ nm_setting_diff (NMSetting *a, } if (*results == NULL) { - *results = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); + *results = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL); results_created = TRUE; } |