From b01d0c021d49c9afaee8d34364c622a899a480ea Mon Sep 17 00:00:00 2001 From: altffour Date: Mon, 11 Jan 2021 16:26:35 +0300 Subject: [PATCH] xdg: use if/else in place of shortened if --- src/core/core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/core/core.c b/src/core/core.c index 04885ec3..6a927177 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -239,11 +239,13 @@ void core_preinit(const char *path) irssi_cache_dir = irssi_dir; irssi_runtime_dir = irssi_dir; } - if (irssi_config_file == NULL) - irssi_config_file = use_xdg ? g_build_filename(g_get_user_config_dir(), "irssi", - IRSSI_HOME_CONFIG, NULL) : - g_strdup_printf("%s/" IRSSI_HOME_CONFIG, irssi_dir); - else { + if (irssi_config_file == NULL) { + if (use_xdg) + irssi_config_file = g_build_filename(g_get_user_config_dir(), "irssi", + IRSSI_HOME_CONFIG, NULL); + else + irssi_config_file = g_strdup_printf("%s/" IRSSI_HOME_CONFIG, irssi_dir); + } else { str = irssi_config_file; irssi_config_file = fix_path(str); g_free(str);