summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-08-06 17:43:16 +0200
committerThomas Haller <thaller@redhat.com>2020-09-03 11:39:39 +0200
commitfc66ad70d52a81695e5c1b932005301bccf9afa5 (patch)
tree7c0db5366390d6c9194b659e111f86c506c200d2
parentbff23d15d41a42c7b5f43cb3d18d66e7cd289823 (diff)
downloadNetworkManager-fc66ad70d52a81695e5c1b932005301bccf9afa5.tar.gz
shared: add nm_g_hash_table_contains() helper
-rw-r--r--shared/nm-glib-aux/nm-shared-utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.h b/shared/nm-glib-aux/nm-shared-utils.h
index cf13142ddf..b31c4779da 100644
--- a/shared/nm-glib-aux/nm-shared-utils.h
+++ b/shared/nm-glib-aux/nm-shared-utils.h
@@ -1631,6 +1631,12 @@ nm_g_hash_table_lookup (GHashTable *hash, gconstpointer key)
}
static inline gboolean
+nm_g_hash_table_contains (GHashTable *hash, gconstpointer key)
+{
+ return hash ? g_hash_table_contains (hash, key) : FALSE;
+}
+
+static inline gboolean
nm_g_hash_table_remove (GHashTable *hash, gconstpointer key)
{
return hash ? g_hash_table_remove (hash, key) : FALSE;