[Telepathy-commits] [telepathy-gabble/master] Coding style: if (foo != NULL) rather than if (foo) for pointer types

Will Thompson will.thompson at collabora.co.uk
Tue Dec 2 04:33:57 PST 2008


---
 src/jingle-content.c |    4 ++--
 src/jingle-session.c |   14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/jingle-content.c b/src/jingle-content.c
index 7444f5c..45e8f7a 100644
--- a/src/jingle-content.c
+++ b/src/jingle-content.c
@@ -478,7 +478,7 @@ gabble_jingle_content_parse_add (GabbleJingleContent *c,
     }
 
   parse_description (c, desc_node, error);
-  if (*error)
+  if (*error != NULL)
       return;
 
   DEBUG ("content creating new transport type %s", g_type_name (transport_type));
@@ -550,7 +550,7 @@ gabble_jingle_content_parse_accept (GabbleJingleContent *c,
     }
 
   parse_description (c, desc_node, error);
-  if (*error)
+  if (*error != NULL)
       return;
 
   // FIXME: this overlaps with _update_senders, maybe merge?
diff --git a/src/jingle-session.c b/src/jingle-session.c
index aac77b5..6ee63b6 100644
--- a/src/jingle-session.c
+++ b/src/jingle-session.c
@@ -479,7 +479,7 @@ _foreach_content (GabbleJingleSession *sess, LmMessageNode *node,
       c = g_hash_table_lookup (priv->contents, name);
 
       func (sess, c, content_node, error);
-      if (*error)
+      if (*error != NULL)
         return;
     }
 }
@@ -497,7 +497,7 @@ _each_content_add (GabbleJingleSession *sess, GabbleJingleContent *c,
   GType content_type = 0;
   const gchar *content_ns = NULL;
 
-  if (desc_node)
+  if (desc_node != NULL)
     {
       content_ns = lm_message_node_get_attribute (desc_node, "xmlns");
       content_type =
@@ -552,7 +552,7 @@ _each_content_add (GabbleJingleSession *sess, GabbleJingleContent *c,
     ((priv->dialect == JINGLE_DIALECT_GTALK3) ||
     (priv->dialect == JINGLE_DIALECT_GTALK4)), error);
 
-  if (*error)
+  if (*error != NULL)
     {
       g_object_unref (c);
       return;
@@ -607,7 +607,7 @@ _each_content_modify (GabbleJingleSession *sess, GabbleJingleContent *c,
 
   gabble_jingle_content_update_senders (c, content_node, error);
 
-  if (*error)
+  if (*error != NULL)
     return;
 }
 
@@ -617,7 +617,7 @@ _each_content_replace (GabbleJingleSession *sess, GabbleJingleContent *c,
 {
   _each_content_remove (sess, c, content_node, error);
 
-  if (*error)
+  if (*error != NULL)
     return;
 
   _each_content_add (sess, c, content_node, error);
@@ -742,7 +742,7 @@ on_session_accept (GabbleJingleSession *sess, LmMessageNode *node,
       _foreach_content (sess, node, _each_content_accept, error);
     }
 
-  if (*error)
+  if (*error != NULL)
       return;
 
   set_state (sess, JS_STATE_ACTIVE);
@@ -990,7 +990,7 @@ gabble_jingle_session_parse (GabbleJingleSession *sess, LmMessage *message, GErr
 
   jingle_state_machine_dance (sess, action, session_node, error);
 
-  if (*error)
+  if (*error != NULL)
     return NULL;
 
   return sid;
-- 
1.5.6.5




More information about the Telepathy-commits mailing list