[gnome-online-accounts/wip/rishi/libsecret-workaround: 1/7] utils: Style fixes
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/wip/rishi/libsecret-workaround: 1/7] utils: Style fixes
- Date: Mon, 3 Jul 2017 17:11:39 +0000 (UTC)
commit 368d7140f103de734cbbff120a0dfc2a7cff280c
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Jun 30 18:37:00 2017 +0200
utils: Style fixes
Don't use a separate line to initialize variables.
src/goabackend/goautils.c | 26 +++++++-------------------
1 files changed, 7 insertions(+), 19 deletions(-)
---
diff --git a/src/goabackend/goautils.c b/src/goabackend/goautils.c
index 1b6a7f9..b06c875 100644
--- a/src/goabackend/goautils.c
+++ b/src/goabackend/goautils.c
@@ -245,9 +245,7 @@ goa_utils_check_duplicate (GoaClient *client,
{
GList *accounts;
GList *l;
- gboolean ret;
-
- ret = FALSE;
+ gboolean ret = FALSE;
accounts = goa_client_get_accounts (client);
for (l = accounts; l != NULL; l = l->next)
@@ -361,8 +359,8 @@ goa_utils_delete_credentials_for_id_sync (GoaProvider *provider,
GCancellable *cancellable,
GError **error)
{
- gboolean ret;
- gchar *password_key;
+ gboolean ret = FALSE;
+ gchar *password_key = NULL;
GError *sec_error = NULL;
g_return_val_if_fail (GOA_IS_PROVIDER (provider), FALSE);
@@ -370,10 +368,6 @@ goa_utils_delete_credentials_for_id_sync (GoaProvider *provider,
g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- ret = FALSE;
-
- password_key = NULL;
-
password_key = g_strdup_printf ("%s:gen%d:%s",
goa_provider_get_provider_type (GOA_PROVIDER (provider)),
goa_provider_get_credentials_generation (GOA_PROVIDER (provider)),
@@ -409,9 +403,9 @@ goa_utils_lookup_credentials_sync (GoaProvider *provider,
GCancellable *cancellable,
GError **error)
{
- gchar *password_key;
- GVariant *ret;
- gchar *password;
+ gchar *password_key = NULL;
+ GVariant *ret = NULL;
+ gchar *password = NULL;
const gchar *id;
GError *sec_error = NULL;
@@ -420,10 +414,6 @@ goa_utils_lookup_credentials_sync (GoaProvider *provider,
g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
- ret = NULL;
- password_key = NULL;
- password = NULL;
-
id = goa_account_get_id (goa_object_peek_account (object));
password_key = g_strdup_printf ("%s:gen%d:%s",
@@ -485,7 +475,7 @@ goa_utils_store_credentials_for_id_sync (GoaProvider *provider,
GCancellable *cancellable,
GError **error)
{
- gboolean ret;
+ gboolean ret = FALSE;
gchar *credentials_str;
gchar *password_description;
gchar *password_key;
@@ -497,8 +487,6 @@ goa_utils_store_credentials_for_id_sync (GoaProvider *provider,
g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- ret = FALSE;
-
credentials_str = g_variant_print (credentials, TRUE);
g_variant_ref_sink (credentials);
g_variant_unref (credentials);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]