Minor cleanup of replace conversion functions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2010-07-14 09:42:18 +04:00
parent 49f70b5339
commit 11e335cdba
1 changed files with 10 additions and 9 deletions

View File

@ -1646,13 +1646,14 @@ edit_replace_cmd__conv_to_display (char *str)
{
#ifdef HAVE_CHARSET
GString *tmp;
tmp = str_convert_to_display (str);
if (tmp && tmp->len)
tmp = str_convert_to_display (str);
if (tmp != NULL)
{
return g_string_free (tmp, FALSE);
if (tmp->len != 0)
return g_string_free (tmp, FALSE);
g_string_free (tmp, TRUE);
}
g_string_free (tmp, TRUE);
#endif
return g_strdup (str);
}
@ -1662,14 +1663,14 @@ edit_replace_cmd__conv_to_input (char *str)
{
#ifdef HAVE_CHARSET
GString *tmp;
tmp = str_convert_to_input (str);
if (tmp && tmp->len)
tmp = str_convert_to_input (str);
if (tmp != NULL)
{
return g_string_free (tmp, FALSE);
if (tmp->len != 0)
return g_string_free (tmp, FALSE);
g_string_free (tmp, TRUE);
}
g_string_free (tmp, TRUE);
return g_strdup (str);
#endif
return g_strdup (str);
}