From 2a3d3bc13c2ccbd6b2e2c613334456c563f60b26 Mon Sep 17 00:00:00 2001 From: ksqsf Date: Sun, 11 Feb 2018 00:35:59 +0800 Subject: [PATCH] Remove pointless optimization in get_default_conf() --- src/utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/utils.c b/src/utils.c index a7d63bb9..26c31816 100644 --- a/src/utils.c +++ b/src/utils.c @@ -482,9 +482,6 @@ get_default_conf(void) static char userconf[PATH_MAX] = { 0 }; char *conf_home; - if (userconf[0] != '\0') - return userconf; - conf_home = getenv("XDG_CONFIG_HOME"); if (!conf_home) { @@ -500,5 +497,6 @@ get_default_conf(void) return userconf; // If not, fall back to the system-wide config. + userconf[0] = '\0'; return sysconf; }