[empathy: 47/65] Use tp_clear_pointer() where possible



commit a272c04575698908bff1363f3d652cc67876e599
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Aug 18 16:43:17 2010 +0200

    Use tp_clear_pointer() where possible

 libempathy/empathy-tls-verifier.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/libempathy/empathy-tls-verifier.c b/libempathy/empathy-tls-verifier.c
index cd76a89..c2169f0 100644
--- a/libempathy/empathy-tls-verifier.c
+++ b/libempathy/empathy-tls-verifier.c
@@ -619,14 +619,10 @@ empathy_tls_verifier_finalize (GObject *object)
 
   DEBUG ("%p", object);
 
-  if (priv->trusted_ca_list != NULL)
-    g_ptr_array_unref (priv->trusted_ca_list);
-
-  if (priv->cert_chain != NULL)
-    g_ptr_array_unref (priv->cert_chain);
-
-  g_free (priv->hostname);
+  tp_clear_pointer (&priv->trusted_ca_list, g_ptr_array_unref);
+  tp_clear_pointer (&priv->cert_chain, g_ptr_array_unref);
   tp_clear_boxed (G_TYPE_HASH_TABLE, &priv->details);
+  g_free (priv->hostname);
 
   G_OBJECT_CLASS (empathy_tls_verifier_parent_class)->finalize (object);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]