summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2020-01-30 15:16:22 -0800
committerCedric BAIL <cedric.bail@free.fr>2020-01-31 10:11:33 -0800
commit5d20a3bc6db0071c6fe063553d59b946917315dd (patch)
tree35fa79f2f2dae3355bc71ed2b6d44eaa2baab103
parentc7508d3d521b548429c8f00e0018c3565a3c8299 (diff)
eina: do not warn when calling eina_inarray_pop on empty inarray to match eina_array_pop.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11253
-rw-r--r--src/lib/eina/eina_inarray.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eina/eina_inarray.c b/src/lib/eina/eina_inarray.c
index 709ae6ff36..e900e05b6e 100644
--- a/src/lib/eina/eina_inarray.c
+++ b/src/lib/eina/eina_inarray.c
@@ -532,7 +532,7 @@ EAPI void *
532eina_inarray_pop(Eina_Inarray *array) 532eina_inarray_pop(Eina_Inarray *array)
533{ 533{
534 EINA_MAGIC_CHECK_INARRAY(array, NULL); 534 EINA_MAGIC_CHECK_INARRAY(array, NULL);
535 EINA_SAFETY_ON_TRUE_RETURN_VAL(array->len == 0, NULL); 535 if (array->len == 0) return NULL;
536 if (!_eina_inarray_resize(array, array->len - 1)) 536 if (!_eina_inarray_resize(array, array->len - 1))
537 return NULL; 537 return NULL;
538 array->len--; 538 array->len--;