aboutsummaryrefslogtreecommitdiff
path: root/osc.c
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2024-08-03 09:42:37 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2024-08-03 09:42:37 +0000
commitb27841e1b590f91c9de21bb694909211421e5f96 (patch)
tree6f0f5a1fec321ae8c96e1bc019cc625d50b35012 /osc.c
parentosc: kitty notifications: ignore invalid IDs (diff)
parentxmalloc: remove delim param from xstrjoin() and add separate xstrjoin3() (diff)
Merge branch 'xstrjoin3'
Diffstat (limited to 'osc.c')
-rw-r--r--osc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/osc.c b/osc.c
index 3ae8a051..28d8b7b8 100644
--- a/osc.c
+++ b/osc.c
@@ -797,7 +797,7 @@ kitty_notification(struct terminal *term, char *string)
else {
/* Append, comma separated */
char *old_category = category;
- category = xstrjoin(old_category, decoded, ',');
+ category = xstrjoin3(old_category, ",", decoded);
free(decoded);
free(old_category);
}
@@ -940,7 +940,7 @@ kitty_notification(struct terminal *term, char *string)
category = NULL; /* Prevent double free */
} else {
/* Append, comma separated */
- char *new_category = xstrjoin(notif->category, category, ',');
+ char *new_category = xstrjoin3(notif->category, ",", category);
free(notif->category);
notif->category = new_category;
}
@@ -959,7 +959,7 @@ kitty_notification(struct terminal *term, char *string)
payload = NULL;
} else {
char *old = *ptr;
- *ptr = xstrjoin(old, payload, 0);
+ *ptr = xstrjoin(old, payload);
free(old);
}
break;
@@ -1032,7 +1032,7 @@ kitty_notification(struct terminal *term, char *string)
alive_ids = xstrdup(item_id);
else {
char *old_alive_ids = alive_ids;
- alive_ids = xstrjoin(old_alive_ids, item_id, ',');
+ alive_ids = xstrjoin3(old_alive_ids, ",", item_id);
free(old_alive_ids);
}
}