summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/tmux.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2009-07-22 21:58:56 +0000
committernicm <nicm@openbsd.org>2009-07-22 21:58:56 +0000
commitb37345b481737558bf1970de3b5705d6f5f3ca4d (patch)
tree7a466b2f921e74ef797fc2e10e8189bd42aaedf6 /usr.bin/tmux/tmux.c
parentwindow_add_pane cannot fail, so remove the unused cause argument and don't (diff)
downloadwireguard-openbsd-b37345b481737558bf1970de3b5705d6f5f3ca4d.tar.xz
wireguard-openbsd-b37345b481737558bf1970de3b5705d6f5f3ca4d.zip
Pass a set of flags into client_init rather than just a start_server
variable. Only one flag now but more to come later.
Diffstat (limited to 'usr.bin/tmux/tmux.c')
-rw-r--r--usr.bin/tmux/tmux.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c
index 446433e5dad..da3c7ab15ec 100644
--- a/usr.bin/tmux/tmux.c
+++ b/usr.bin/tmux/tmux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.c,v 1.19 2009/07/20 14:37:51 nicm Exp $ */
+/* $OpenBSD: tmux.c,v 1.20 2009/07/22 21:58:56 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -213,7 +213,7 @@ main(int argc, char **argv)
struct passwd *pw;
char *s, *path, *label, *cause, *home, *pass = NULL;
char cwd[MAXPATHLEN];
- int retcode, opt, flags, unlock, start_server;
+ int retcode, opt, flags, unlock, cmdflags = 0;
unlock = flags = 0;
label = path = NULL;
@@ -390,7 +390,7 @@ main(int argc, char **argv)
cmdlist = NULL;
if ((pass = getpass("Password: ")) == NULL)
exit(1);
- start_server = 0;
+ cmdflags &= ~CMD_STARTSERVER;
} else {
if (argc == 0) {
cmd = xmalloc(sizeof *cmd);
@@ -407,17 +407,16 @@ main(int argc, char **argv)
exit(1);
}
}
- start_server = 0;
TAILQ_FOREACH(cmd, cmdlist, qentry) {
if (cmd->entry->flags & CMD_STARTSERVER) {
- start_server = 1;
+ cmdflags |= CMD_STARTSERVER;
break;
}
}
}
memset(&cctx, 0, sizeof cctx);
- if (client_init(path, &cctx, start_server, flags) != 0)
+ if (client_init(path, &cctx, cmdflags, flags) != 0)
exit(1);
xfree(path);