efll.ui.internal_text_interactive: remove useless condition
authorAli Alzyod <ali198724@gmail.com>
Wed, 29 Jan 2020 18:30:39 +0000 (19:30 +0100)
committerJongmin Lee <jm105.lee@samsung.com>
Wed, 29 Jan 2020 22:13:34 +0000 (07:13 +0900)
Summary: Remove useless condition and unreachable return value

Reviewers: woohyun, segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11231

src/lib/elementary/efl_ui_internal_text_interactive.c

index 146deb7..fc43e6f 100644 (file)
@@ -349,6 +349,9 @@ _text_filter_text_prepend(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_Text_Intera
                           const char *fmtpre, const char *fmtpost,
                           Eina_Bool clearsel, Eina_Bool changeinfo)
 {
+   char *markup_text;
+   Efl_Text_Change_Info *info = NULL;
+
    EINA_SAFETY_ON_NULL_RETURN_VAL(text, NULL);
 
    if ((clearsel) && (en->have_selection))
@@ -356,19 +359,12 @@ _text_filter_text_prepend(Efl_Canvas_Textblock *obj, Efl_Ui_Internal_Text_Intera
         _sel_range_del_emit(obj, en);
      }
 
-   if (text)
-     {
-        char *markup_text;
-        Efl_Text_Change_Info *info = NULL;
-
-        markup_text = evas_textblock_text_utf8_to_markup(NULL, text);
-        if (markup_text)
-          info = _text_filter_markup_prepend_internal(obj, en, c, markup_text,
-                                                      fmtpre, fmtpost,
-                                                      clearsel, changeinfo);
-        return info;
-     }
-   return NULL;
+   markup_text = evas_textblock_text_utf8_to_markup(NULL, text);
+   if (markup_text)
+     info = _text_filter_markup_prepend_internal(obj, en, c, markup_text,
+                                                 fmtpre, fmtpost,
+                                                 clearsel, changeinfo);
+   return info;
 }
 
 static void