summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/client.c')
-rw-r--r--usr.bin/tmux/client.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c
index 71ec7358c1c..ccb3ddce812 100644
--- a/usr.bin/tmux/client.c
+++ b/usr.bin/tmux/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.140 2020/04/09 13:52:32 nicm Exp $ */
+/* $OpenBSD: client.c,v 1.141 2020/04/13 08:26:27 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -236,7 +236,6 @@ int
client_main(struct event_base *base, int argc, char **argv, int flags)
{
struct cmd_parse_result *pr;
- struct cmd *cmd;
struct msg_command *data;
int fd, i;
const char *ttynam, *cwd;
@@ -265,10 +264,8 @@ client_main(struct event_base *base, int argc, char **argv, int flags)
*/
pr = cmd_parse_from_arguments(argc, argv, NULL);
if (pr->status == CMD_PARSE_SUCCESS) {
- TAILQ_FOREACH(cmd, &pr->cmdlist->list, qentry) {
- if (cmd->entry->flags & CMD_STARTSERVER)
- flags |= CLIENT_STARTSERVER;
- }
+ if (cmd_list_any_have(pr->cmdlist, CMD_STARTSERVER))
+ flags |= CLIENT_STARTSERVER;
cmd_list_free(pr->cmdlist);
} else
free(pr->error);