# HG changeset patch # User Will Thompson # Date 1194790206 0 # Node ID 84925e6055bc13ff52b7e80b4c20206211d1ec92 # Parent d0b16c09c2c4ef22fabdc2eb103c187e5943d649 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. diff -r d0b16c09c2c4 -r 84925e6055bc libpurple/protocols/sametime/sametime.c --- 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); }