diff --git a/src/diffviewer/search.c b/src/diffviewer/search.c index 489f44e2e..7a71b9867 100644 --- a/src/diffviewer/search.c +++ b/src/diffviewer/search.c @@ -123,11 +123,8 @@ mcdiffview_dialog_search (WDiff * dview) GString *tmp; tmp = str_convert_to_input (exp); - if (tmp != NULL) - { - g_free (exp); - exp = g_string_free (tmp, FALSE); - } + g_free (exp); + exp = g_string_free (tmp, FALSE); } #endif diff --git a/src/editor/editcmd.c b/src/editor/editcmd.c index 59c4c4d09..a0734ee58 100644 --- a/src/editor/editcmd.c +++ b/src/editor/editcmd.c @@ -922,12 +922,9 @@ edit_replace_cmd__conv_to_input (char *str) GString *tmp; tmp = str_convert_to_input (str); - if (tmp != NULL) - { - if (tmp->len != 0) - return g_string_free (tmp, FALSE); - g_string_free (tmp, TRUE); - } + if (tmp->len != 0) + return g_string_free (tmp, FALSE); + g_string_free (tmp, TRUE); #endif return g_strdup (str); } diff --git a/src/editor/editcmd_dialogs.c b/src/editor/editcmd_dialogs.c index 2cdc364de..e426999e2 100644 --- a/src/editor/editcmd_dialogs.c +++ b/src/editor/editcmd_dialogs.c @@ -150,11 +150,8 @@ editcmd_dialog_search_show (WEdit * edit) GString *tmp; tmp = str_convert_to_input (search_text); - if (tmp != NULL) - { - g_free (search_text); - search_text = g_string_free (tmp, FALSE); - } + g_free (search_text); + search_text = g_string_free (tmp, FALSE); } #endif diff --git a/src/viewer/dialogs.c b/src/viewer/dialogs.c index aac153ed4..9af23372e 100644 --- a/src/viewer/dialogs.c +++ b/src/viewer/dialogs.c @@ -128,11 +128,8 @@ mcview_dialog_search (WView * view) GString *tmp; tmp = str_convert_to_input (exp); - if (tmp != NULL) - { - g_free (exp); - exp = g_string_free (tmp, FALSE); - } + g_free (exp); + exp = g_string_free (tmp, FALSE); } #endif