diff options
author | bket <bket@cvs.openbsd.org> | 2020-06-29 15:53:29 +0000 |
---|---|---|
committer | bket <bket@cvs.openbsd.org> | 2020-06-29 15:53:29 +0000 |
commit | 650f40a0c81ed4ae0bb115cffb23cfa52738fc63 (patch) | |
tree | 1b8083563a0e2a6029964e0cb49a656df559f460 | |
parent | 591f446d2858c86fd5cb0ef87b828b6065d66294 (diff) |
Replace TAILQ concatenation loop with TAILQ_CONCAT
As a result remove unneeded variables
OK @nicm
-rw-r--r-- | usr.bin/tmux/cmd.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index 5e116fc36bc..bfceea5f1c1 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.162 2020/06/04 07:12:05 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.163 2020/06/29 15:53:28 bket Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -598,12 +598,7 @@ cmd_list_append(struct cmd_list *cmdlist, struct cmd *cmd) void cmd_list_move(struct cmd_list *cmdlist, struct cmd_list *from) { - struct cmd *cmd, *cmd1; - - TAILQ_FOREACH_SAFE(cmd, from->list, qentry, cmd1) { - TAILQ_REMOVE(from->list, cmd, qentry); - TAILQ_INSERT_TAIL(cmdlist->list, cmd, qentry); - } + TAILQ_CONCAT(cmdlist->list, from->list, qentry); cmdlist->group = cmd_list_next_group++; } |