diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-07-30 22:39:51 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-07-30 22:39:51 +0000 |
| commit | 8f307178df4e7fc4f78d34e9875b8d69b97ea220 (patch) | |
| tree | 78945fc3fd83ccab2acfe5f84a0d72ff5305a6f2 /config.c | |
| parent | doc: foot.ini: include paths are allowed to begin with ~/ (diff) | |
config: include: use xasprintf() instead of two calls to snprintf()
Diffstat (limited to 'config.c')
| -rw-r--r-- | config.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -657,9 +657,7 @@ parse_section_main(const char *key, const char *value, struct config *conf, return false; } - int chars = snprintf(NULL, 0, "%s/%s", home_dir, &value[2]); - _include_path = malloc(chars + 1); - snprintf(_include_path, chars + 1, "%s/%s", home_dir, &value[2]); + _include_path = xasprintf("%s/%s", home_dir, value + 2); include_path = _include_path; } else include_path = value; |
