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



commit f21fa0f1edab406513b807618fced34ca0755a60
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 0b455b1..49ad63d 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -526,18 +526,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]