changeset 23249:996c80ab3dbc

Remove an unnecessary strdup when sending messages over IRC.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 30 May 2008 04:33:44 +0000
parents 228d576a7dd7
children b020c310355a 4f49d4b25e24
files libpurple/protocols/irc/parse.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/irc/parse.c	Fri May 30 01:51:43 2008 +0000
+++ b/libpurple/protocols/irc/parse.c	Fri May 30 04:33:44 2008 +0000
@@ -232,7 +232,7 @@
 
 	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 @@
 		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: