Enlightenment CVS committal

Author  : englebass
Project : e17
Module  : libs/efreet

Dir     : e17/libs/efreet/src/lib


Modified Files:
        efreet_icon.c 


Log Message:
No need for the 'last' variable.

===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_icon.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- efreet_icon.c       26 May 2007 06:45:51 -0000      1.16
+++ efreet_icon.c       29 May 2007 19:29:46 -0000      1.17
@@ -940,7 +940,6 @@
     if (tmp)
     {
         char *t, *s, *p;
-        int last = 0;
 
         icon->attach_points = ecore_list_new();
         ecore_list_set_free_cb(icon->attach_points, 
@@ -949,11 +948,12 @@
         t = strdup(tmp);
         s = t;
         p = t;
-        while (!last)
+        while (s)
         {
             Efreet_Icon_Point *point;
 
             p = strchr(s, ',');
+            /* If this happens there is something wrong with the .icon file */
             if (!p) break;
 
             point = NEW(Efreet_Icon_Point, 1);
@@ -963,14 +963,13 @@
 
             s = ++p;
             p = strchr(s, '|');
-
-            if (!p) last = 1;
-            else *p = '\0';
+            if (p) *p = '\0';
 
             point->y = atoi(s);
             ecore_list_append(icon->attach_points, point);
 
-            if (!last) s = ++p;
+            if (p) s = ++p;
+            else s = NULL;
         }
         FREE(t);
     }



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to