From be1ba8873b6edd5e534932ef23866361930daee2 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Sat, 21 Jul 2007 03:06:08 +0000 Subject: [PATCH] no need for extra nul byte check - while terminated IF its null. so known condition. formatting too. SVN revision: 30923 --- .../src/lib/canvas/evas_object_textblock.c | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 4ff913ed5a..9fd2b8f41f 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -2423,11 +2423,8 @@ evas_object_textblock_style_get(Evas_Object *obj) 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 @@ _is_eq_and_advance(const char *s, const char *s_end, 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 @@ _append_escaped_char(Evas_Textblock_Cursor *cur, const char *s, evas_textblock_cursor_text_append(cur, map_itr); return; } - + if (map_itr < map_itr) _advance_after_end_of_string(&map_itr); }