[gnome-online-accounts] google: Style fixes
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] google: Style fixes
- Date: Fri, 15 Jul 2016 14:11:25 +0000 (UTC)
commit d6cae0d56c5c2b438d598546ec99e8d45ad6f707
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Jul 14 20:01:26 2016 +0200
google: Style fixes
Don't use a separate line to initialize variables.
src/goabackend/goagoogleprovider.c | 44 ++++++++++-------------------------
1 files changed, 13 insertions(+), 31 deletions(-)
---
diff --git a/src/goabackend/goagoogleprovider.c b/src/goabackend/goagoogleprovider.c
index ab7b89b..7f5863d 100644
--- a/src/goabackend/goagoogleprovider.c
+++ b/src/goabackend/goagoogleprovider.c
@@ -193,21 +193,13 @@ 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 *email;
-
- ret = NULL;
-
- identity_error = NULL;
- proxy = NULL;
- call = NULL;
- parser = NULL;
- email = NULL;
+ gchar *ret = NULL;
+ gchar *email = NULL;
/* TODO: cancellable */
@@ -278,16 +270,10 @@ get_identity_sync (GoaOAuth2Provider *oauth2_provider,
static gboolean
is_identity_node (GoaOAuth2Provider *oauth2_provider, WebKitDOMHTMLInputElement *element)
{
- gboolean ret;
- gchar *element_type;
- gchar *id;
- gchar *name;
-
- element_type = NULL;
- id = NULL;
- name = NULL;
-
- ret = FALSE;
+ gboolean ret = FALSE;
+ gchar *element_type = NULL;
+ gchar *id = NULL;
+ gchar *name = NULL;
g_object_get (element, "type", &element_type, NULL);
if (g_strcmp0 (element_type, "email") != 0)
@@ -321,11 +307,11 @@ build_object (GoaProvider *provider,
gboolean just_added,
GError **error)
{
- GoaAccount *account;
- GoaMail *mail;
+ GoaAccount *account = NULL;
+ GoaMail *mail = NULL;
gchar *uri_caldav;
gchar *uri_drive;
- gboolean ret;
+ gboolean ret = FALSE;
gboolean mail_enabled;
gboolean calendar_enabled;
gboolean contacts_enabled;
@@ -336,10 +322,6 @@ build_object (GoaProvider *provider,
gboolean printers_enabled;
const gchar *email_address;
- account = NULL;
- mail = NULL;
- ret = FALSE;
-
/* Chain up */
if (!GOA_PROVIDER_CLASS (goa_google_provider_parent_class)->build_object (provider,
object,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]