From fb01d4e9ab9739e11499538d85e8932fb97a2c57 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 4 May 2013 18:21:48 +0200 Subject: Replace g_strdup_printf with g_build_filename where possible --- src/common/plugin.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/common/plugin.c') diff --git a/src/common/plugin.c b/src/common/plugin.c index c9183ede..686f9749 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -477,7 +477,7 @@ plugin_auto_load (session *sess) char *sub_dir; ps = sess; - sub_dir = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "addons", get_xdir ()); + sub_dir = g_build_filename (get_xdir (), "addons", NULL); #ifdef WIN32 /* a long list of bundled plugins that should be loaded automatically, @@ -1670,9 +1670,9 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char g_free (buffer); close (fhOut); - buffer = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", get_xdir (), confname); + buffer = g_build_filename (get_xdir (), confname, NULL); g_free (confname); - buffer_tmp = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", get_xdir (), confname_tmp); + buffer_tmp = g_build_filename (get_xdir (), confname_tmp, NULL); g_free (confname_tmp); #ifdef WIN32 @@ -1744,9 +1744,9 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char close (fhOut); - buffer = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", get_xdir (), confname); + buffer = g_build_filename (get_xdir (), confname, NULL); g_free (confname); - buffer_tmp = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", get_xdir (), confname_tmp); + buffer_tmp = g_build_filename (get_xdir (), confname_tmp, NULL); g_free (confname_tmp); #ifdef WIN32 -- cgit 1.4.1