summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_inline_array.x
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina/eina_inline_array.x')
-rw-r--r--src/lib/eina/eina_inline_array.x11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/eina/eina_inline_array.x b/src/lib/eina/eina_inline_array.x
index 8367d61e7b..a78b674edd 100644
--- a/src/lib/eina/eina_inline_array.x
+++ b/src/lib/eina/eina_inline_array.x
@@ -44,16 +44,13 @@ EAPI Eina_Bool eina_array_grow(Eina_Array *array);
44static inline Eina_Bool 44static inline Eina_Bool
45eina_array_push(Eina_Array *array, const void *data) 45eina_array_push(Eina_Array *array, const void *data)
46{ 46{
47 if (data) 47 if (EINA_UNLIKELY(data == NULL)) return EINA_FALSE;
48 { 48 if (EINA_UNLIKELY((array->count + 1) > array->total)) goto do_grow;
49 if (EINA_UNLIKELY((array->count + 1) > array->total)) goto do_grow;
50do_grow_back: 49do_grow_back:
51 50
52 array->data[array->count++] = (void*) data; 51 array->data[array->count++] = (void*) data;
53 52
54 return EINA_TRUE; 53 return EINA_TRUE;
55 }
56 return EINA_FALSE;
57do_grow: 54do_grow:
58 if (!eina_array_grow(array)) return EINA_FALSE; 55 if (!eina_array_grow(array)) return EINA_FALSE;
59 goto do_grow_back; 56 goto do_grow_back;