[gnome-online-accounts] facebook: Style fixes



commit 03bb5078b71e98283af1c56b119cd65e973e97be
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Jul 14 19:59:30 2016 +0200

    facebook: Style fixes
    
    Don't use a separate line to initialize variables.

 src/goabackend/goafacebookprovider.c |   38 +++++++++------------------------
 1 files changed, 11 insertions(+), 27 deletions(-)
---
diff --git a/src/goabackend/goafacebookprovider.c b/src/goabackend/goafacebookprovider.c
index c262a75..80fa9cd 100644
--- a/src/goabackend/goafacebookprovider.c
+++ b/src/goabackend/goafacebookprovider.c
@@ -176,23 +176,14 @@ get_identity_sync (GoaOAuth2Provider  *oauth2_provider,
                    GCancellable       *cancellable,
                    GError            **error)
 {
-  GError *identity_error;
-  RestProxy *proxy;
-  RestProxyCall *call;
-  JsonParser *parser;
+  GError *identity_error = NULL;
+  RestProxy *proxy = NULL;
+  RestProxyCall *call = NULL;
+  JsonParser *parser = NULL;
   JsonObject *json_object;
-  gchar *ret;
-  gchar *id;
-  gchar *presentation_identity;
-
-  ret = NULL;
-
-  identity_error = NULL;
-  proxy = NULL;
-  call = NULL;
-  parser = NULL;
-  id = NULL;
-  presentation_identity = NULL;
+  gchar *ret = NULL;
+  gchar *id = NULL;
+  gchar *presentation_identity = NULL;
 
   /* TODO: cancellable */
 
@@ -285,14 +276,9 @@ get_identity_sync (GoaOAuth2Provider  *oauth2_provider,
 static gboolean
 is_identity_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMHTMLInputElement *element)
 {
-  gboolean ret;
-  gchar *element_type;
-  gchar *name;
-
-  element_type = NULL;
-  name = NULL;
-
-  ret = FALSE;
+  gboolean ret = FALSE;
+  gchar *element_type = NULL;
+  gchar *name = NULL;
 
   g_object_get (element, "type", &element_type, NULL);
   if (g_strcmp0 (element_type, "text") != 0)
@@ -321,13 +307,11 @@ build_object (GoaProvider         *provider,
               gboolean             just_added,
               GError             **error)
 {
-  GoaAccount *account;
+  GoaAccount *account = NULL;
   gboolean photos_enabled;
   gboolean maps_enabled;
   gboolean ret = FALSE;
 
-  account = NULL;
-
   /* Chain up */
   if (!GOA_PROVIDER_CLASS (goa_facebook_provider_parent_class)->build_object (provider,
                                                                               object,


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