Mercurial > pidgin.yaz
diff libpurple/protocols/sametime/sametime.c @ 21317:84925e6055bc
Use distinct variables for the result of g_strerror (which is const) and a
g_strdup_printf (which is not), squashing a warning in sametime.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Sun, 11 Nov 2007 14:10:06 +0000 |
parents | 6de09629f091 |
children | 1ce05db42eb3 |
line wrap: on
line diff
--- a/libpurple/protocols/sametime/sametime.c Sun Nov 11 14:08:30 2007 +0000 +++ b/libpurple/protocols/sametime/sametime.c Sun Nov 11 14:10:06 2007 +0000 @@ -1702,11 +1702,12 @@ purple_connection_error(pd->gc, _("Connection reset")); } else if(ret < 0) { - char *msg = g_strerror(err); - - DEBUG_INFO("error in read callback: %s\n", msg); - - msg = g_strdup_printf(_("Error reading from socket: %s"), msg); + const gchar *err_str = g_strerror(err); + char *msg = NULL; + + DEBUG_INFO("error in read callback: %s\n", err_str); + + msg = g_strdup_printf(_("Error reading from socket: %s"), err_str); purple_connection_error(pd->gc, msg); g_free(msg); }