1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Use char* instead of const char* in read_settings, so memory can be freed without compiler warnings, by Toby Peterson (related to bug 210)

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3723 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Valentin Batz 2005-03-07 17:10:45 +00:00 committed by vb
parent e1c7d7e260
commit dca0d7a2bc

View File

@ -152,9 +152,9 @@ static void fe_recode_remove_cmd (const char *data, SERVER_REC *server, WI_ITEM_
static void read_settings(void)
{
/* preserve the valid values */
const char *old_term_charset = g_strdup(term_charset);
const char *old_recode_fallback = g_strdup(recode_fallback);
const char *old_recode_out_default = g_strdup(recode_out_default);
char *old_term_charset = g_strdup(term_charset);
char *old_recode_fallback = g_strdup(recode_fallback);
char *old_recode_out_default = g_strdup(recode_out_default);
if (recode_fallback)
g_free(recode_fallback);
@ -196,6 +196,10 @@ static void read_settings(void)
recode_out_default = is_valid_charset(old_recode_out_default) ? g_strdup(old_recode_out_default) : NULL;
settings_set_str("recode_out_default_charset", recode_out_default);
}
g_free(old_term_charset);
g_free(old_recode_fallback);
g_free(old_recode_out_default);
}
static void message_own_public(const SERVER_REC *server, const char *msg,