summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-01-06 12:42:53 +0100
committerDave Davenport <qball@gmpclient.org>2016-01-06 12:42:53 +0100
commit7f621a4a915792868c09a3d7f9f7a48015c576c8 (patch)
tree5a64d41af683b2e73baeec0b5c1963cc17cb7777
parentc512f81c9ca3b9a17768ef18ea09bca9c41ee8fe (diff)
Replace strdup_printf with build_filename
-rw-r--r--source/dialogs/ssh.c4
1 files 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 ) {