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
This commit is contained in:
Vincent Torri 2019-09-23 14:00:25 +00:00 committed by Stefan Schmidt
parent f18201749c
commit e79d6bd0af
1 changed files with 4 additions and 3 deletions

View File

@ -95,15 +95,16 @@ eina_array_count(const Eina_Array *array)
static inline Eina_Bool
eina_array_find(const Eina_Array *array, const void *data, unsigned int *out_idx)
{
unsigned int i;
if (!array) return EINA_FALSE;
unsigned int i = 0;
for (; i < array->count; i++)
for (i = 0; i < array->count; i++)
{
if (array->data[i] == data)
{
if (out_idx) *out_idx = i;
return EINA_TRUE;
}
}