[gnome-remote-desktop/gnome-42] settings: Do not set error twice when secret_password_lookup_sync fails



commit 2e0e6ace81e77fa92645b146940c1e6d0e62e6d3
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Tue Aug 2 07:13:11 2022 +0200

    settings: Do not set error twice when secret_password_lookup_sync fails

 src/grd-settings.c | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)
---
diff --git a/src/grd-settings.c b/src/grd-settings.c
index dad5d570..a3650448 100644
--- a/src/grd-settings.c
+++ b/src/grd-settings.c
@@ -135,11 +135,7 @@ grd_settings_get_rdp_username (GrdSettings  *settings,
                                                     NULL, error,
                                                     NULL);
   if (!credentials_string)
-    {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
-                   "Credentials not set");
-      return NULL;
-    }
+    return NULL;
 
   credentials = g_variant_parse (NULL, credentials_string, NULL, NULL, NULL);
   if (!credentials)
@@ -177,11 +173,7 @@ grd_settings_get_rdp_password (GrdSettings  *settings,
                                                     NULL, error,
                                                     NULL);
   if (!credentials_string)
-    {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
-                   "Credentials not set");
-      return NULL;
-    }
+    return NULL;
 
   credentials = g_variant_parse (NULL, credentials_string, NULL, NULL, NULL);
   if (!credentials)
@@ -217,11 +209,7 @@ grd_settings_get_vnc_password (GrdSettings  *settings,
                                           NULL, error,
                                           NULL);
   if (!password)
-    {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
-                   "Password not set");
-      return NULL;
-    }
+    return NULL;
 
   return password;
 }


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