str_convert_to_input() never returns NULL.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2018-01-21 11:59:12 +03:00
parent 454e23d48f
commit 9b74ff8653
4 changed files with 9 additions and 21 deletions

View File

@ -123,12 +123,9 @@ 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);
}
}
#endif
g_free (dview->search.last_string);

View File

@ -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);
}
#endif
return g_strdup (str);
}

View File

@ -150,12 +150,9 @@ 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);
}
}
#endif
g_free (edit->last_search_string);

View File

@ -128,12 +128,9 @@ 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);
}
}
#endif
g_free (view->last_search_string);