summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-09-23 14:00:25 +0000
committerStefan Schmidt <s.schmidt@samsung.com>2019-09-23 16:43:54 +0200
commite79d6bd0af5748bc26f3af713058d5847df8c807 (patch)
tree62d454101b5127a9fef3c026e8fe4e4c27a115d8 /src/lib/eina
parentf18201749c4b6571fc2c2a97fad520fff0d73059 (diff)
eina_array: do not mix declaration and definition
fix warning when used in C90 code. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D10077
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_inline_array.x7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/eina/eina_inline_array.x b/src/lib/eina/eina_inline_array.x
index f3c11f6..d750782 100644
--- a/src/lib/eina/eina_inline_array.x
+++ b/src/lib/eina/eina_inline_array.x
@@ -95,15 +95,16 @@ eina_array_count(const Eina_Array *array)
95static inline Eina_Bool 95static inline Eina_Bool
96eina_array_find(const Eina_Array *array, const void *data, unsigned int *out_idx) 96eina_array_find(const Eina_Array *array, const void *data, unsigned int *out_idx)
97{ 97{
98 unsigned int i;
99
98 if (!array) return EINA_FALSE; 100 if (!array) return EINA_FALSE;
99 101
100 unsigned int i = 0; 102 for (i = 0; i < array->count; i++)
101 for (; i < array->count; i++)
102 { 103 {
103 if (array->data[i] == data) 104 if (array->data[i] == data)
104 { 105 {
105 if (out_idx) *out_idx = i; 106 if (out_idx) *out_idx = i;
106 107
107 return EINA_TRUE; 108 return EINA_TRUE;
108 } 109 }
109 } 110 }