summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2016-01-04 15:13:06 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-01-04 15:13:06 -0800
commit5aa6a73b3461af4d67ba2dfe369ee2da3e11c9b5 (patch)
treed29793b18b52be64ed9b8e31b3d2a964e3a493ab
parentc963a0f9cb3009b7ad1a5cdc623b0d7c9f8d3e4f (diff)
eina: return NULL iterator in all case, not only when safety check is turned on.
-rw-r--r--src/lib/eina/eina_hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/eina/eina_hash.c b/src/lib/eina/eina_hash.c
index fe2ec51f23..f950b19f7d 100644
--- a/src/lib/eina/eina_hash.c
+++ b/src/lib/eina/eina_hash.c
@@ -1221,7 +1221,7 @@ eina_hash_iterator_data_new(const Eina_Hash *hash)
1221{ 1221{
1222 Eina_Iterator_Hash *it; 1222 Eina_Iterator_Hash *it;
1223 1223
1224 EINA_SAFETY_ON_NULL_RETURN_VAL(hash, NULL); 1224 if (!hash) return NULL;
1225 EINA_MAGIC_CHECK_HASH(hash); 1225 EINA_MAGIC_CHECK_HASH(hash);
1226 1226
1227 it = calloc(1, sizeof (Eina_Iterator_Hash)); 1227 it = calloc(1, sizeof (Eina_Iterator_Hash));
@@ -1247,7 +1247,7 @@ eina_hash_iterator_key_new(const Eina_Hash *hash)
1247{ 1247{
1248 Eina_Iterator_Hash *it; 1248 Eina_Iterator_Hash *it;
1249 1249
1250 EINA_SAFETY_ON_NULL_RETURN_VAL(hash, NULL); 1250 if (!hash) return NULL;
1251 EINA_MAGIC_CHECK_HASH(hash); 1251 EINA_MAGIC_CHECK_HASH(hash);
1252 1252
1253 it = calloc(1, sizeof (Eina_Iterator_Hash)); 1253 it = calloc(1, sizeof (Eina_Iterator_Hash));
@@ -1274,7 +1274,7 @@ eina_hash_iterator_tuple_new(const Eina_Hash *hash)
1274{ 1274{
1275 Eina_Iterator_Hash *it; 1275 Eina_Iterator_Hash *it;
1276 1276
1277 EINA_SAFETY_ON_NULL_RETURN_VAL(hash, NULL); 1277 if (!hash) return NULL;
1278 EINA_MAGIC_CHECK_HASH(hash); 1278 EINA_MAGIC_CHECK_HASH(hash);
1279 1279
1280 it = calloc(1, sizeof (Eina_Iterator_Hash)); 1280 it = calloc(1, sizeof (Eina_Iterator_Hash));