mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
xmalloc: remove delim param from xstrjoin() and add separate xstrjoin3()
This avoids the need for an unused third argument for most xstrjoin() calls and replaces the cases where it's needed with a more flexible function. Code generation is the same in both cases, when there are 2 string params and a compile-time known delimiter. This commit also converts 4 uses of xasprintf() to use xstrjoin*(). See also: https://godbolt.org/z/xsjrhv9b6
This commit is contained in:
parent
62b0b65d47
commit
f87c9bb9f7
7 changed files with 44 additions and 31 deletions
2
notify.c
2
notify.c
|
|
@ -77,7 +77,7 @@ write_icon_file(const void *data, size_t data_sz, int *fd, char **filename,
|
|||
|
||||
LOG_DBG("wrote icon data to %s", name);
|
||||
*filename = xstrdup(name);
|
||||
*symbolic_name = xasprintf("file://%s", *filename);
|
||||
*symbolic_name = xstrjoin("file://", *filename);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue