aboutsummaryrefslogtreecommitdiff
path: root/slave.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2024-08-14 09:59:23 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-08-14 09:59:23 +0000
commit54c1660a1e6834aaba9b86a5cca6d22eebc28a41 (patch)
treeba877ef70c20aa78b633af3c9fefff099d7bc2f1 /slave.c
parentmeson: bump version to 1.18.0 (diff)
parentosc: regression: fix OSC-111 handling of alpha changes (diff)
Merge branch 'master' into releases/1.18
Diffstat (limited to 'slave.c')
-rw-r--r--slave.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/slave.c b/slave.c
index 00105adb..47e59e87 100644
--- a/slave.c
+++ b/slave.c
@@ -55,7 +55,7 @@ find_file_in_path(const char *file)
path != NULL;
path = strtok(NULL, ":"))
{
- char *full = xasprintf("%s/%s", path, file);
+ char *full = xstrjoin3(path, "/", file);
if (access(full, F_OK) == 0) {
free(path_list);
return full;
@@ -158,6 +158,7 @@ emit_one_notification(int fd, const struct user_notification *notif)
xassert(prefix != NULL);
if (write(fd, prefix, strlen(prefix)) < 0 ||
+ write(fd, "foot: ", 6) < 0 ||
write(fd, notif->text, strlen(notif->text)) < 0 ||
write(fd, postfix, strlen(postfix)) < 0)
{
@@ -180,7 +181,8 @@ emit_one_notification(int fd, const struct user_notification *notif)
}
static bool
-emit_notifications_of_kind(int fd, const user_notifications_t *notifications,
+emit_notifications_of_kind(int fd,
+ const user_notifications_t *notifications,
enum user_notification_kind kind)
{
tll_foreach(*notifications, it) {
@@ -329,7 +331,7 @@ add_to_env(struct environ *env, const char *name, const char *value)
if (env->envp == NULL)
setenv(name, value, 1);
else {
- char *e = xasprintf("%s=%s", name, value);
+ char *e = xstrjoin3(name, "=", value);
/* Search for existing variable. If found, replace it with the
new value */