diff options
Diffstat (limited to 'slave.c')
| -rw-r--r-- | slave.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 */ |
