summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c
diff options
context:
space:
mode:
authorbket <bket@openbsd.org>2020-06-29 15:53:28 +0000
committerbket <bket@openbsd.org>2020-06-29 15:53:28 +0000
commit8cfec971bf21366bac9b1b0f4184cd192e01d0b5 (patch)
treef482dc934788b9aad64ffe2041098c9d991c2b3d /usr.bin/tmux/cmd.c
parentBuild on powerpc64. (diff)
downloadwireguard-openbsd-8cfec971bf21366bac9b1b0f4184cd192e01d0b5.tar.xz
wireguard-openbsd-8cfec971bf21366bac9b1b0f4184cd192e01d0b5.zip
Replace TAILQ concatenation loop with TAILQ_CONCAT
As a result remove unneeded variables OK @nicm
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r--usr.bin/tmux/cmd.c9
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++;
}