summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2021-08-17 11:20:14 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2021-08-17 11:20:14 +0000
commit2910fbbbee5ce45133b37b49b08006d186a66a4a (patch)
tree6d7c7fafe8889038c3b4507c6d33b0382165f268 /usr.bin
parentec7002bef17a1da929ba62feb7652c6aa4cd31ee (diff)
calloc for confirm-before data since the item needs to start NULL.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/cmd-confirm-before.c4
-rw-r--r--usr.bin/tmux/tty.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-confirm-before.c b/usr.bin/tmux/cmd-confirm-before.c
index 059f4bfa097..ce051edd697 100644
--- a/usr.bin/tmux/cmd-confirm-before.c
+++ b/usr.bin/tmux/cmd-confirm-before.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-confirm-before.c,v 1.45 2021/08/13 06:50:42 nicm Exp $ */
+/* $OpenBSD: cmd-confirm-before.c,v 1.46 2021/08/17 11:20:13 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -72,7 +72,7 @@ cmd_confirm_before_exec(struct cmd *self, struct cmdq_item *item)
free(copy);
}
- cdata = xmalloc(sizeof *cdata);
+ cdata = xcalloc(1, sizeof *cdata);
cdata->cmd = xstrdup(args->argv[0]);
cmd_get_source(self, &cdata->pi.file, &cdata->pi.line);
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 1224871e990..8be5aadb8ee 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.402 2021/08/17 08:44:52 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.403 2021/08/17 11:20:13 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -2043,7 +2043,7 @@ tty_cmd_syncstart(struct tty *tty, const struct tty_ctx *ctx)
{
if (ctx->num == 0x11) {
/*
- * This is an overlay and a command that moves, the cursor so
+ * This is an overlay and a command that moves the cursor so
* start synchronized updates.
*/
tty_sync_start(tty);