[gnome-remote-desktop] rdp: Replace all strdup() calls with g_strdup()



commit 6918aaacd12b4b4e75973996bc133146930d53b5
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Tue Aug 16 15:25:24 2022 +0200

    rdp: Replace all strdup() calls with g_strdup()
    
    For consistency reason only use one variant here.

 src/grd-rdp-fuse-clipboard.c | 2 +-
 src/grd-session-rdp.c        | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/grd-rdp-fuse-clipboard.c b/src/grd-rdp-fuse-clipboard.c
index 5c99bb0d..7dd55b5f 100644
--- a/src/grd-rdp-fuse-clipboard.c
+++ b/src/grd-rdp-fuse-clipboard.c
@@ -1470,7 +1470,7 @@ fuse_file_new_root (void)
   FuseFile *root_dir;
 
   root_dir = g_malloc0 (sizeof (FuseFile));
-  root_dir->filename_with_root = strdup ("/");
+  root_dir->filename_with_root = g_strdup ("/");
   root_dir->filename = root_dir->filename_with_root;
   root_dir->ino = FUSE_ROOT_ID;
   root_dir->is_directory = TRUE;
diff --git a/src/grd-session-rdp.c b/src/grd-session-rdp.c
index 441596f2..fc202f04 100644
--- a/src/grd-session-rdp.c
+++ b/src/grd-session-rdp.c
@@ -2040,8 +2040,10 @@ init_rdp_session (GrdSessionRdp  *session_rdp,
       return FALSE;
     }
 
-  rdp_settings->CertificateFile = strdup (grd_settings_get_rdp_server_cert (settings));
-  rdp_settings->PrivateKeyFile = strdup (grd_settings_get_rdp_server_key (settings));
+  rdp_settings->CertificateFile =
+    g_strdup (grd_settings_get_rdp_server_cert (settings));
+  rdp_settings->PrivateKeyFile =
+    g_strdup (grd_settings_get_rdp_server_key (settings));
   rdp_settings->RdpSecurity = FALSE;
   rdp_settings->TlsSecurity = FALSE;
   rdp_settings->NlaSecurity = TRUE;


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