From 4a76a0d5435a7cf94e84198e2515773143e4f85c Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 16 Jan 2017 14:49:15 +0000 Subject: getopt() has a struct option so just return to using options_entry. --- usr.bin/tmux/client.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'usr.bin/tmux/client.c') 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 @@ -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). */ -- cgit v1.2.3