pidgin: eeed2c96: Remove an unnecessary strdup when sendin...
sadrul at pidgin.im
sadrul at pidgin.im
Fri May 30 00:35:49 EDT 2008
-----------------------------------------------------------------
Revision: eeed2c960a1dbe213de63e3115629056ac809beb
Ancestor: 8413990c54fe1bbc384c606c0933573140a81630
Author: sadrul at pidgin.im
Date: 2008-05-30T04:33:44
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/eeed2c960a1dbe213de63e3115629056ac809beb
Modified files:
libpurple/protocols/irc/parse.c
ChangeLog:
Remove an unnecessary strdup when sending messages over IRC.
-------------- next part --------------
============================================================
--- libpurple/protocols/irc/parse.c ccfb71b737275b45901ffe4ebce726870d9a53d8
+++ libpurple/protocols/irc/parse.c 45fbe577ecbf1bc34969294b7b9b0fbbe05d7957
@@ -232,7 +232,7 @@ static char *irc_send_convert(struct irc
if (encodings[0] == NULL || !g_ascii_strcasecmp("UTF-8", encodings[0])) {
g_strfreev(encodings);
- return g_strdup(string);
+ return NULL;
}
utf8 = g_convert(string, strlen(string), encodings[0], "UTF-8", NULL, NULL, &err);
@@ -597,7 +597,7 @@ char *irc_format(struct irc_conn *irc, c
case 'n':
case 'c':
tmp = irc_send_convert(irc, tok);
- g_string_append(string, tmp);
+ g_string_append(string, tmp ? tmp : tok);
g_free(tmp);
break;
default:
More information about the Commits
mailing list