From 4766171bc6a764c5cb49a341595fff96fd66fec6 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Wed, 16 Mar 2011 18:57:04 +0000 Subject: Connector: simplify building a debug string --- wocky/wocky-connector.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wocky/wocky-connector.c b/wocky/wocky-connector.c index 5d20330..d5f9417 100644 --- a/wocky/wocky-connector.c +++ b/wocky/wocky-connector.c @@ -301,7 +301,6 @@ struct _WockyConnectorPrivate static char * state_message (WockyConnectorPrivate *priv, const char *str) { - GString *msg = g_string_new (""); const char *state = NULL; if (priv->authed) @@ -318,8 +317,7 @@ state_message (WockyConnectorPrivate *priv, const char *str) else state = "Connecting... "; - g_string_printf (msg, "%s: %s", state, str); - return g_string_free (msg, FALSE); + return g_strdup_printf ("%s: %s", state, str); } static void -- cgit v1.2.3