aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2024-03-16 20:17:53 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2024-03-16 20:17:53 +0000
commit853be450bb95cb7b022f6dad4263e4a92bf18e4b (patch)
tree28b45591cd431e565cd73d15d6400c099d92f154 /config.c
parentwayland: skip loading cursor theme when using server side cursors (diff)
main/config: replace some uses of xasprintf() with xstrjoin()
Diffstat (limited to 'config.c')
-rw-r--r--config.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/config.c b/config.c
index ab0e2927..ff92cb46 100644
--- a/config.c
+++ b/config.c
@@ -355,9 +355,9 @@ open_config(void)
/* First, check XDG_CONFIG_HOME (or .config, if unset) */
if (xdg_config_home != NULL && xdg_config_home[0] != '\0')
- path = xasprintf("%s/foot/foot.ini", xdg_config_home);
+ path = xstrjoin(xdg_config_home, "/foot/foot.ini");
else if (home_dir != NULL)
- path = xasprintf("%s/.config/foot/foot.ini", home_dir);
+ path = xstrjoin(home_dir, "/.config/foot/foot.ini");
if (path != NULL) {
LOG_DBG("checking for %s", path);
@@ -382,7 +382,7 @@ open_config(void)
conf_dir = strtok(NULL, ":"))
{
free(path);
- path = xasprintf("%s/foot/foot.ini", conf_dir);
+ path = xstrjoin(conf_dir, "/foot/foot.ini");
LOG_DBG("checking for %s", path);
int fd = open(path, O_RDONLY | O_CLOEXEC);
@@ -2861,7 +2861,7 @@ get_server_socket_path(void)
const char *wayland_display = getenv("WAYLAND_DISPLAY");
if (wayland_display == NULL) {
- return xasprintf("%s/foot.sock", xdg_runtime);
+ return xstrjoin(xdg_runtime, "/foot.sock");
}
return xasprintf("%s/foot-%s.sock", xdg_runtime, wayland_display);