summaryrefslogtreecommitdiffstats
path: root/cmd-show-messages.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2015-04-25 20:45:02 +0000
committerThomas Adam <thomas@xteddy.org>2015-04-25 20:45:02 +0000
commit72e9ebf2ece28c986050162bf4f401a6a7679f53 (patch)
treec31a424328859542a7a1248a9e411aac8fc5b3e9 /cmd-show-messages.c
parent56e1132db485aeb0730ce7782533ca441e63afef (diff)
parenta568b9cadce002f6f7e8ee914c995242bd70cce5 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-show-messages.c')
-rw-r--r--cmd-show-messages.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd-show-messages.c b/cmd-show-messages.c
index 308668f1..ccc11c92 100644
--- a/cmd-show-messages.c
+++ b/cmd-show-messages.c
@@ -129,7 +129,6 @@ cmd_show_messages_exec(struct cmd *self, struct cmd_q *cmdq)
struct client *c;
struct message_entry *msg;
char *tim;
- u_int i;
int done;
done = 0;
@@ -155,9 +154,7 @@ cmd_show_messages_exec(struct cmd *self, struct cmd_q *cmdq)
if ((c = cmd_find_client(cmdq, args_get(args, 't'), 0)) == NULL)
return (CMD_RETURN_ERROR);
- for (i = 0; i < ARRAY_LENGTH(&c->message_log); i++) {
- msg = &ARRAY_ITEM(&c->message_log, i);
-
+ TAILQ_FOREACH(msg, &c->message_log, entry) {
tim = ctime(&msg->msg_time);
*strchr(tim, '\n') = '\0';