summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-show-messages.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2020-04-13 20:54:15 +0000
committernicm <nicm@openbsd.org>2020-04-13 20:54:15 +0000
commit73e52ff847ba9dfd12a86b8cc56007dccbb4d982 (patch)
tree2a7a6374a2964f4026535f37cbee818e1962fbf5 /usr.bin/tmux/cmd-show-messages.c
parentMake client -c and -t handling common in cmd-queue.c and try to be (diff)
downloadwireguard-openbsd-73e52ff847ba9dfd12a86b8cc56007dccbb4d982.tar.xz
wireguard-openbsd-73e52ff847ba9dfd12a86b8cc56007dccbb4d982.zip
Missed a few warnings in previous.
Diffstat (limited to 'usr.bin/tmux/cmd-show-messages.c')
-rw-r--r--usr.bin/tmux/cmd-show-messages.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/tmux/cmd-show-messages.c b/usr.bin/tmux/cmd-show-messages.c
index a6c5f524772..daef7aa884a 100644
--- a/usr.bin/tmux/cmd-show-messages.c
+++ b/usr.bin/tmux/cmd-show-messages.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-show-messages.c,v 1.30 2020/04/13 20:51:57 nicm Exp $ */
+/* $OpenBSD: cmd-show-messages.c,v 1.31 2020/04/13 20:54:15 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -70,7 +70,7 @@ static enum cmd_retval
cmd_show_messages_exec(struct cmd *self, struct cmdq_item *item)
{
struct args *args = cmd_get_args(self);
- struct client *c;
+ struct client *tc = cmdq_get_target_client(item);
struct message_entry *msg;
char *tim;
int done, blank;
@@ -87,10 +87,9 @@ cmd_show_messages_exec(struct cmd *self, struct cmdq_item *item)
if (done)
return (CMD_RETURN_NORMAL);
- TAILQ_FOREACH(msg, &c->message_log, entry) {
+ TAILQ_FOREACH(msg, &tc->message_log, entry) {
tim = ctime(&msg->msg_time);
*strchr(tim, '\n') = '\0';
-
cmdq_print(item, "%s %s", tim, msg->msg);
}