From e6c53a570d33ad48d8d8b49cc4339092dbf65a8f Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 16 Sep 2011 15:45:51 +0300 Subject: [PATCH 10/18] IdleConnection: Use tp_strdiff and tp_str_empty --- src/idle-connection.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/idle-connection.c b/src/idle-connection.c index 3bc9b07..0a4bc8b 100644 --- a/src/idle-connection.c +++ b/src/idle-connection.c @@ -697,18 +697,18 @@ static void _start_connecting_continue(IdleConnection *conn) { IdleConnectionPrivate *priv = IDLE_CONNECTION_GET_PRIVATE(conn); IdleServerConnection *sconn; - if (!priv->realname || !priv->realname[0]) { + if (tp_str_empty(priv->realname)) { const gchar *g_realname = g_get_real_name(); g_free(priv->realname); - if (g_realname && g_realname[0] && strcmp(g_realname, "Unknown")) + if (tp_strdiff(g_realname, "Unknown")) priv->realname = g_strdup(g_realname); else priv->realname = g_strdup(priv->nickname); } - if (!priv->username || !priv->username[0]) { + if (tp_str_empty(priv->username)) { g_free(priv->username); priv->username = g_strdup(g_get_user_name()); } -- 1.7.6.2