From a7aaf30440bfa1ee8968703e07dd2dfeedc1b2ae Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Wed, 13 Aug 2008 09:21:33 +0000 Subject: [PATCH] Merge common code. SVN revision: 35455 --- legacy/eina/src/lib/eina_inlist.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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;