Enlightenment CVS committal

Author  : tsauerbeck
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/data


Modified Files:
        evas_list.c 


Log Message:
evas_list_nth_* improvements, step 1
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/data/evas_list.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- evas_list.c 16 Aug 2004 05:13:25 -0000      1.6
+++ evas_list.c 31 Jan 2005 17:26:11 -0000      1.7
@@ -666,15 +666,9 @@
 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;
 }
 
 /**




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to