diff options
author | 2015-12-14 23:30:58 +0000 | |
---|---|---|
committer | 2015-12-14 23:30:58 +0000 | |
commit | 351f93d4fddc914fc6a8749daffb1826a0ac87a6 (patch) | |
tree | 8b8494210f47979959557a6ee7b0e0150c6dcf33 /usr.bin/tmux/cmd.c | |
parent | Use long long rather than off_t for line_no to ensure that it's always (diff) | |
download | wireguard-openbsd-351f93d4fddc914fc6a8749daffb1826a0ac87a6.tar.xz wireguard-openbsd-351f93d4fddc914fc6a8749daffb1826a0ac87a6.zip |
Use cmd_find_clear_state instead of an extra function doing the same.
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r-- | usr.bin/tmux/cmd.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c index 6ada1b7b3dd..e8f012d1932 100644 --- a/usr.bin/tmux/cmd.c +++ b/usr.bin/tmux/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.118 2015/12/14 00:31:54 nicm Exp $ */ +/* $OpenBSD: cmd.c,v 1.119 2015/12/14 23:30:58 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -388,22 +388,6 @@ usage: return (NULL); } -static void -cmd_clear_state(struct cmd_state *state) -{ - state->c = NULL; - - state->tflag.s = NULL; - state->tflag.wl = NULL; - state->tflag.wp = NULL; - state->tflag.idx = -1; - - state->sflag.s = NULL; - state->sflag.wl = NULL; - state->sflag.wp = NULL; - state->sflag.idx = -1; -} - static int cmd_prepare_state_flag(struct cmd_find_state *fs, enum cmd_entry_flag flag, const char *target, struct cmd_q *cmdq) @@ -493,7 +477,9 @@ cmd_prepare_state(struct cmd *cmd, struct cmd_q *cmdq) log_debug("preparing state for %s (client %p)", tmp, cmdq->client); free(tmp); - cmd_clear_state(state); + state->c = NULL; + cmd_find_clear_state(&state->tflag, NULL, 0); + cmd_find_clear_state(&state->sflag, NULL, 0); flag = cmd->entry->cflag; if (flag == CMD_NONE) { |