[gnome-online-accounts/wip/mail: 2/6] Use g_clear_object wherever applicable



commit 630ba8c01559dd5e400506f7f7f8c7270e74c8f3
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Jan 28 21:43:36 2013 +0100

    Use g_clear_object wherever applicable

 src/goabackend/goagoogleprovider.c |   18 ++++++------------
 1 files changed, 6 insertions(+), 12 deletions(-)
---
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index c6ab02f..b8aaf84 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -528,18 +528,12 @@ build_object (GoaProvider         *provider,
   ret = TRUE;
 
  out:
-  if (documents != NULL)
-    g_object_unref (documents);
-  if (chat != NULL)
-    g_object_unref (chat);
-  if (contacts != NULL)
-    g_object_unref (contacts);
-  if (calendar != NULL)
-    g_object_unref (calendar);
-  if (mail != NULL)
-    g_object_unref (mail);
-  if (account != NULL)
-    g_object_unref (account);
+  g_clear_object (&documents);
+  g_clear_object (&chat);
+  g_clear_object (&contacts);
+  g_clear_object (&calendar);
+  g_clear_object (&mail);
+  g_clear_object (&account);
   return ret;
 }
 


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