mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04: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:
parent
e1c7d7e260
commit
dca0d7a2bc
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user