mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-29 12:42:16 -05:00
Avoid useless strdup() and free() calls
This commit is contained in:
parent
67274f91e9
commit
5fa23341b3
@ -1194,15 +1194,17 @@ servlist_load_defaults (void)
|
|||||||
if (def[i].network)
|
if (def[i].network)
|
||||||
{
|
{
|
||||||
net = servlist_net_add (def[i].network, def[i].host, FALSE);
|
net = servlist_net_add (def[i].network, def[i].host, FALSE);
|
||||||
net->encoding = strdup (IRC_DEFAULT_CHARSET);
|
|
||||||
if (def[i].channel)
|
if (def[i].channel)
|
||||||
{
|
{
|
||||||
servlist_favchan_add (net, def[i].channel);
|
servlist_favchan_add (net, def[i].channel);
|
||||||
}
|
}
|
||||||
if (def[i].charset)
|
if (def[i].charset)
|
||||||
{
|
{
|
||||||
free (net->encoding);
|
net->encoding = g_strdup (def[i].charset);
|
||||||
net->encoding = strdup (def[i].charset);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
net->encoding = g_strdup (IRC_DEFAULT_CHARSET);
|
||||||
}
|
}
|
||||||
if (def[i].loginmode)
|
if (def[i].loginmode)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user