diff options
Diffstat (limited to 'cmd-show-messages.c')
-rw-r--r-- | cmd-show-messages.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd-show-messages.c b/cmd-show-messages.c index 3b7baa89..028b4bb0 100644 --- a/cmd-show-messages.c +++ b/cmd-show-messages.c @@ -130,7 +130,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; @@ -156,9 +155,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'; |