From 7f621a4a915792868c09a3d7f9f7a48015c576c8 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Wed, 6 Jan 2016 12:42:53 +0100 Subject: [PATCH] Replace strdup_printf with build_filename --- source/dialogs/ssh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dialogs/ssh.c b/source/dialogs/ssh.c index 15bde77d..8524cf44 100644 --- a/source/dialogs/ssh.c +++ b/source/dialogs/ssh.c @@ -262,7 +262,7 @@ static char ** get_ssh ( unsigned int *length ) return NULL; } - path = g_strdup_printf ( "%s/%s", cache_dir, SSH_CACHE_FILE ); + path = g_build_filename ( cache_dir, SSH_CACHE_FILE, NULL ); retv = history_get_list ( path, length ); g_free ( path ); num_favorites = ( *length ); @@ -276,7 +276,7 @@ static char ** get_ssh ( unsigned int *length ) FILE *fd = NULL; const char *hd = getenv ( "HOME" ); - path = g_strdup_printf ( "%s/%s", hd, ".ssh/config" ); + path = g_build_filename ( hd, ".ssh", "config", NULL ); fd = fopen ( path, "r" ); if ( fd != NULL ) {