[gnome-settings-daemon/wip/nacho/cleanups: 1/2] smartcard-manager: reduce variable scope




commit 6816b3e47463e3192d83a555071c7d5efe701b91
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date:   Tue Oct 18 16:36:41 2022 +0200

    smartcard-manager: reduce variable scope

 plugins/smartcard/gsd-smartcard-manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/smartcard/gsd-smartcard-manager.c b/plugins/smartcard/gsd-smartcard-manager.c
index fc6ae0b0..292ea63c 100644
--- a/plugins/smartcard/gsd-smartcard-manager.c
+++ b/plugins/smartcard/gsd-smartcard-manager.c
@@ -122,13 +122,14 @@ load_nss (GsdSmartcardManager *self)
 
         if (context == NULL) {
                 gsize error_message_size;
-                char *error_message;
 
                 error_message_size = PR_GetErrorTextLength ();
 
                 if (error_message_size == 0) {
                         g_debug ("NSS security system could not be initialized");
                 } else {
+                        char *error_message;
+
                         error_message = g_alloca (error_message_size);
                         PR_GetErrorText (error_message);
 


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