[NetworkManager-vpnc/pr/6: 2/2] auth-dialog: avoid unnecessary strdup() in eui_finish()



commit 9d34861cf43951a548ddaa0d9009662ac8edc541
Author: Thomas Haller <thaller redhat com>
Date:   Mon May 4 17:46:55 2020 +0200

    auth-dialog: avoid unnecessary strdup() in eui_finish()

 auth-dialog/main.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/auth-dialog/main.c b/auth-dialog/main.c
index 530d6fd..56e07c9 100644
--- a/auth-dialog/main.c
+++ b/auth-dialog/main.c
@@ -154,7 +154,6 @@ eui_finish (const char *vpn_name,
             const char *existing_group_password)
 {
        GKeyFile *keyfile;
-       char *title;
        gboolean show;
 
        keyfile = g_key_file_new ();
@@ -162,9 +161,7 @@ eui_finish (const char *vpn_name,
        g_key_file_set_integer (keyfile, UI_KEYFILE_GROUP, "Version", 2);
        g_key_file_set_string (keyfile, UI_KEYFILE_GROUP, "Description", prompt);
 
-       title = g_strdup_printf (_("Authenticate VPN"));
-       g_key_file_set_string (keyfile, UI_KEYFILE_GROUP, "Title", title);
-       g_free (title);
+       g_key_file_set_string (keyfile, UI_KEYFILE_GROUP, "Title", _("Authenticate VPN"));
 
        /* Tell the external UI to show the password if (a) no password was passed
         * from the UI initially and nothing was found in the keyring, but the


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