[gnome-online-accounts] live: Style fixes
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] live: Style fixes
- Date: Fri, 15 Jul 2016 14:11:30 +0000 (UTC)
commit fe855826ce17eb77a2cf7547c16ce591414b4276
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Jul 14 20:06:15 2016 +0200
live: Style fixes
Don't use a separate line to initialize variables.
src/goabackend/goawindowsliveprovider.c | 41 +++++++++----------------------
1 files changed, 12 insertions(+), 29 deletions(-)
---
diff --git a/src/goabackend/goawindowsliveprovider.c b/src/goabackend/goawindowsliveprovider.c
index 6dcb4d4..1b25793 100644
--- a/src/goabackend/goawindowsliveprovider.c
+++ b/src/goabackend/goawindowsliveprovider.c
@@ -161,23 +161,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 */
@@ -263,14 +254,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;
/* FIXME: This does not show up in
* webkit_dom_document_get_elements_by_tag_name, but can be
@@ -304,16 +290,13 @@ build_object (GoaProvider *provider,
gboolean just_added,
GError **error)
{
- GoaAccount *account;
- GoaMail *mail;
+ GoaAccount *account = NULL;
+ GoaMail *mail = NULL;
gboolean mail_enabled;
gboolean documents_enabled;
gboolean ret = FALSE;
const gchar *email_address;
- account = NULL;
- mail = NULL;
-
/* Chain up */
if (!GOA_PROVIDER_CLASS (goa_windows_live_provider_parent_class)->build_object (provider,
object,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]