summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-03-16 18:57:04 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2011-03-17 14:25:13 +0000
commit4766171bc6a764c5cb49a341595fff96fd66fec6 (patch)
tree85d533e59c46f83da018f6646459ad1209c89a77
parent1d3db8d669e73f6d18f3130891e53d19913ad0f2 (diff)
Connector: simplify building a debug string
-rw-r--r--wocky/wocky-connector.c4
1 files changed, 1 insertions, 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