evas_list_nth_* improvements, step 1

SVN revision: 13155
This commit is contained in:
tsauerbeck 2005-01-31 17:26:11 +00:00 committed by tsauerbeck
parent 49924ef327
commit 81a15a090e
1 changed files with 3 additions and 9 deletions

View File

@ -666,15 +666,9 @@ evas_list_count(Evas_List *list)
void *
evas_list_nth(Evas_List *list, int n)
{
int i;
Evas_List *l;
if (n < 0) return NULL;
for (i = 0, l = list; l; l = l->next, i++)
{
if (i == n) return l->data;
}
return NULL;
Evas_List *l = evas_list_nth_list(list, n);
return l ? l->data : NULL;
}
/**