diff options
| author | Craig Barnes <craigbarnes@protonmail.com> | 2024-03-16 20:17:53 +0000 |
|---|---|---|
| committer | Craig Barnes <craigbarnes@protonmail.com> | 2024-03-16 20:17:53 +0000 |
| commit | 853be450bb95cb7b022f6dad4263e4a92bf18e4b (patch) | |
| tree | 28b45591cd431e565cd73d15d6400c099d92f154 /config.c | |
| parent | wayland: 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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |
