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,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

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);
}
if (tmp->len != 0)
return g_string_free (tmp, FALSE);
g_string_free (tmp, TRUE);
#endif
return g_strdup (str);
}

View File

@ -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

View File

@ -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