[gnome-online-accounts/wip/rishi/gobject-modernize: 4/5] identity-service: Style fixes



commit 7a0356be22702cd7c159c05806bc2ceb4a012df9
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Nov 28 16:55:30 2019 +0100

    identity-service: Style fixes
    
    Don't use a separate line to initialize variables.
    
    https://gitlab.gnome.org/GNOME/gnome-online-accounts/merge_requests/36

 src/goaidentity/goaidentityservice.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/src/goaidentity/goaidentityservice.c b/src/goaidentity/goaidentityservice.c
index d4927c24..abbbdbae 100644
--- a/src/goaidentity/goaidentityservice.c
+++ b/src/goaidentity/goaidentityservice.c
@@ -176,13 +176,11 @@ find_object_with_principal (GoaIdentityService *self,
   GoaIdentityServicePrivate *priv;
   GList      *objects;
   GList      *node;
-  GoaObject  *found_object;
+  GoaObject  *found_object = NULL;
 
   priv = goa_identity_service_get_instance_private (self);
 
   objects = goa_client_get_accounts (priv->client);
-
-  found_object = NULL;
   for (node = objects; node != NULL; node = node->next)
     {
       GoaObject *object = GOA_OBJECT (node->data);
@@ -345,15 +343,11 @@ goa_identity_service_handle_sign_in (GoaIdentityServiceManager *manager,
   GoaIdentityServicePrivate *priv;
   GTask                  *operation_result;
   GoaIdentitySignInFlags  flags;
-  char                   *secret_key;
-  char                   *preauth_source;
-  gconstpointer           initial_password;
+  char                   *secret_key = NULL;
+  char                   *preauth_source = NULL;
+  gconstpointer           initial_password = NULL;
   GCancellable           *cancellable;
 
-  secret_key = NULL;
-  preauth_source = NULL;
-  initial_password = NULL;
-
   priv = goa_identity_service_get_instance_private (self);
 
   read_sign_in_details (manager, details, &flags, &secret_key, &preauth_source);


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