Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

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


Modified Files:
        evas_object_textblock.c 


Log Message:


no need for extra nul byte check - while terminated IF its null. so known
condition. formatting too.

===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -3 -r1.141 -r1.142
--- evas_object_textblock.c     20 Jul 2007 22:30:12 -0000      1.141
+++ evas_object_textblock.c     21 Jul 2007 03:06:08 -0000      1.142
@@ -2423,11 +2423,8 @@
 static inline void
 _advance_after_end_of_string(const char **p_buf)
 {
-   while (**p_buf != '\0')
-     (*p_buf)++;
-
-   if (**p_buf == '\0')
-     (*p_buf)++;
+   while (**p_buf != 0) (*p_buf)++;
+   (*p_buf)++;
 }
 
 static inline int
@@ -2435,12 +2432,14 @@
                   const char **p_m, const char *m_end)
 {
    for (;((s < s_end) && (*p_m < m_end)); s++, (*p_m)++)
-     if (*s != **p_m)
-       {
-         _advance_after_end_of_string(p_m);
-         return 0;
-       }
-
+     {
+       if (*s != **p_m)
+         {
+            _advance_after_end_of_string(p_m);
+            return 0;
+         }
+     }
+   
    if (*p_m < m_end)
      _advance_after_end_of_string(p_m);
 
@@ -2463,7 +2462,7 @@
             evas_textblock_cursor_text_append(cur, map_itr);
             return;
          }
-
+       
        if (map_itr < map_itr)
          _advance_after_end_of_string(&map_itr);
      }



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to