diff options
author | Thomas Haller <thaller@redhat.com> | 2020-08-06 17:43:16 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-09-03 11:39:39 +0200 |
commit | fc66ad70d52a81695e5c1b932005301bccf9afa5 (patch) | |
tree | 7c0db5366390d6c9194b659e111f86c506c200d2 | |
parent | bff23d15d41a42c7b5f43cb3d18d66e7cd289823 (diff) | |
download | NetworkManager-fc66ad70d52a81695e5c1b932005301bccf9afa5.tar.gz |
shared: add nm_g_hash_table_contains() helper
-rw-r--r-- | shared/nm-glib-aux/nm-shared-utils.h | 6 |
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; |