summaryrefslogtreecommitdiff
path: root/src/settings/nm-inotify-helper.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-11-15 16:03:33 +0100
committerThomas Haller <thaller@redhat.com>2017-11-16 11:49:51 +0100
commitb58481b31ec5785d208a7b11df5b05fc50c158e2 (patch)
tree7842c2662049462e6f89b1090af6e51908ea37d6 /src/settings/nm-inotify-helper.c
parent3ee8de20c452955b30c28d4c5080a976d77f507c (diff)
downloadNetworkManager-b58481b31ec5785d208a7b11df5b05fc50c158e2.tar.gz
all: don't use g_direct_equal() for hash table equality function
GHashTable optimizes a NULL equality function to use direct pointer comparison. That saves the overhead of calling g_direct_equal(). This is also documented behavior for g_hash_table_new(). While at it, also don't pass g_direct_hash() but use the default of %NULL. The behavior is the same, but consistently don't use g_direct_hash().
Diffstat (limited to 'src/settings/nm-inotify-helper.c')
-rw-r--r--src/settings/nm-inotify-helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/settings/nm-inotify-helper.c b/src/settings/nm-inotify-helper.c
index 4c65b02da5..5d190b11a9 100644
--- a/src/settings/nm-inotify-helper.c
+++ b/src/settings/nm-inotify-helper.c
@@ -172,7 +172,7 @@ nm_inotify_helper_init (NMInotifyHelper *self)
{
NMInotifyHelperPrivate *priv = NM_INOTIFY_HELPER_GET_PRIVATE (self);
- priv->wd_refs = g_hash_table_new (g_direct_hash, g_direct_equal);
+ priv->wd_refs = g_hash_table_new (NULL, NULL);
}
static void