[Telepathy-commits] [telepathy-gabble/master] Use !tp_strdiff instead of g_str_equal

Alban Crequy alban.crequy at collabora.co.uk
Tue Aug 19 10:52:41 PDT 2008


g_str_equal(suffix, caps_hash) is never executed when suffix is NULL. However,
the code is more readable when using !tp_strdiff().


20080521144745-a41c0-3fc48cb714e9862a0837d4a9e8510bfb350b4d1e.gz
---
 src/gabble-connection.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gabble-connection.c b/src/gabble-connection.c
index e51d6db..72befe5 100644
--- a/src/gabble-connection.c
+++ b/src/gabble-connection.c
@@ -1501,7 +1501,7 @@ connection_iq_disco_cb (LmMessageHandler *handler,
   caps_hash = caps_hash_compute_from_self_presence (self);
   DEBUG ("caps_hash='%s'", caps_hash);
 
-  if (NULL == node || bundle_found || g_str_equal (suffix, caps_hash))
+  if (NULL == node || bundle_found || !tp_strdiff (suffix, caps_hash))
     {
       if (NULL == node)
         DEBUG ("No requested node. Send all features.");
-- 
1.5.6.3




More information about the Telepathy-commits mailing list