From 1ef431ab3854f12de04a68a006aec8f5ce68ba20 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 10 Oct 2015 17:32:53 +0200 Subject: [PATCH] platform: use nm_g_hash_table_add() compat wrapper in _nmp_cache_update_add() --- src/platform/nmp-object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c index 9f8d4f3cc1..162b61feaf 100644 --- a/src/platform/nmp-object.c +++ b/src/platform/nmp-object.c @@ -1303,12 +1303,8 @@ _nmp_cache_update_add (NMPCache *cache, NMPObject *obj) nm_assert (!obj->is_cached); nmp_object_ref (obj); nm_assert (!nm_multi_index_lookup_first_by_value (cache->idx_multi, &obj->object)); -#if GLIB_CHECK_VERSION(2, 40, 0) - if (!g_hash_table_add (cache->idx_main, obj)) + if (!nm_g_hash_table_add (cache->idx_main, obj)) g_assert_not_reached (); -#else - g_hash_table_add (cache->idx_main, obj); -#endif obj->is_cached = TRUE; _nmp_cache_update_cache (cache, obj, FALSE); }