summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2017-01-16 14:49:15 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2017-01-16 14:49:15 +0000
commit4a76a0d5435a7cf94e84198e2515773143e4f85c (patch)
tree501189cd68a4f35fa94e0f700665b1a68dca9b79 /usr.bin/tmux/client.c
parent7353230a73bc2fbc4d31c4c34bbdbd010944dc6f (diff)
getopt() has a struct option so just return to using options_entry.
Diffstat (limited to 'usr.bin/tmux/client.c')
-rw-r--r--usr.bin/tmux/client.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c
index 1eb9c8e0570..df6b5fa8b8d 100644
--- a/usr.bin/tmux/client.c
+++ b/usr.bin/tmux/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.115 2017/01/13 10:12:12 nicm Exp $ */
+/* $OpenBSD: client.c,v 1.116 2017/01/16 14:49:14 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -252,16 +252,13 @@ client_main(struct event_base *base, int argc, char **argv, int flags,
* flag.
*/
cmdlist = cmd_list_parse(argc, argv, NULL, 0, &cause);
- if (cmdlist == NULL) {
- fprintf(stderr, "%s\n", cause);
- return (1);
- }
- cmdflags &= ~CMD_STARTSERVER;
- TAILQ_FOREACH(cmd, &cmdlist->list, qentry) {
- if (cmd->entry->flags & CMD_STARTSERVER)
- cmdflags |= CMD_STARTSERVER;
+ if (cmdlist != NULL) {
+ TAILQ_FOREACH(cmd, &cmdlist->list, qentry) {
+ if (cmd->entry->flags & CMD_STARTSERVER)
+ cmdflags |= CMD_STARTSERVER;
+ }
+ cmd_list_free(cmdlist);
}
- cmd_list_free(cmdlist);
}
/* Create client process structure (starts logging). */