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

Marco Barisione marco at barisione.org
Tue Jan 6 08:41:28 PST 2009


---
 src/bytestream-factory.c |    4 ++--
 src/bytestream-socks5.c  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index 2c0676e..275768e 100644
--- a/src/bytestream-factory.c
+++ b/src/bytestream-factory.c
@@ -1007,7 +1007,7 @@ handle_socks5_query_iq (GabbleBytestreamFactory *self,
     }
 
   tmp = lm_message_node_get_attribute (query_node, "mode");
-  if (tmp != NULL && strcmp (tmp, "tcp") != 0)
+  if (tp_strdiff (tmp, "tcp"))
     {
       DEBUG ("non-TCP SOCKS5 bytestreams are not supported");
       _gabble_connection_send_iq_error (priv->conn, msg,
@@ -1018,7 +1018,7 @@ handle_socks5_query_iq (GabbleBytestreamFactory *self,
   child_node = query_node->children;
   while (child_node)
     {
-      if (strcmp (child_node->name, "streamhost") == 0)
+      if (!tp_strdiff (child_node->name, "streamhost"))
         gabble_bytestream_socks5_add_streamhost (bytestream, child_node);
 
       child_node = child_node->next;
diff --git a/src/bytestream-socks5.c b/src/bytestream-socks5.c
index 4d615ce..2d4029e 100644
--- a/src/bytestream-socks5.c
+++ b/src/bytestream-socks5.c
@@ -937,7 +937,7 @@ gabble_bytestream_socks5_add_streamhost (GabbleBytestreamSocks5 *self,
   guint numeric_port;
   Streamhost *streamhost;
 
-  g_return_if_fail (strcmp (streamhost_node->name, "streamhost") == 0);
+  g_return_if_fail (!tp_strdiff (streamhost_node->name, "streamhost"));
 
   zeroconf = lm_message_node_get_attribute (streamhost_node, "zeroconf");
   if (zeroconf != NULL)
-- 
1.5.6.5




More information about the Telepathy-commits mailing list