diff --git a/legacy/eina/src/lib/eina_inlist.c b/legacy/eina/src/lib/eina_inlist.c index d3af896a52..d748896659 100644 --- a/legacy/eina/src/lib/eina_inlist.c +++ b/legacy/eina/src/lib/eina_inlist.c @@ -79,7 +79,6 @@ eina_inlist_accessor_get_at(Eina_Accessor_Inlist *it, unsigned int index, void * ++i, over = over->next) ; - if (over == NULL) return EINA_FALSE; } else { middle = it->index >> 1; @@ -89,19 +88,17 @@ eina_inlist_accessor_get_at(Eina_Accessor_Inlist *it, unsigned int index, void * i > index && over != NULL; --i, over = over->prev) ; - - if (over == NULL) return EINA_FALSE; } else { /* Looking from the start. */ for (i = 0, over = it->head; i < index && over != NULL; ++i, over = over->next) ; - - if (over == NULL) return EINA_FALSE; } } + if (over == NULL) return EINA_FALSE; + it->current = over; it->index = index;