summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-confirm-before.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-01-15 22:00:56 +0000
committernicm <nicm@openbsd.org>2017-01-15 22:00:56 +0000
commit4caf08d85017e79a0d85141c7f91bc1d926f93d1 (patch)
tree8af792a07aec22718908b4b08e1249bbf552fce2 /usr.bin/tmux/cmd-confirm-before.c
parent-q flag now needs to be checked in a couple more places. (diff)
downloadwireguard-openbsd-4caf08d85017e79a0d85141c7f91bc1d926f93d1.tar.xz
wireguard-openbsd-4caf08d85017e79a0d85141c7f91bc1d926f93d1.zip
It is silly for cmd_list_parse to return an integer error when it could
just return NULL.
Diffstat (limited to 'usr.bin/tmux/cmd-confirm-before.c')
-rw-r--r--usr.bin/tmux/cmd-confirm-before.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-confirm-before.c b/usr.bin/tmux/cmd-confirm-before.c
index ac0fc7a7120..cf683645bfb 100644
--- a/usr.bin/tmux/cmd-confirm-before.c
+++ b/usr.bin/tmux/cmd-confirm-before.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-confirm-before.c,v 1.32 2017/01/06 11:57:03 nicm Exp $ */
+/* $OpenBSD: cmd-confirm-before.c,v 1.33 2017/01/15 22:00:56 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -112,7 +112,8 @@ cmd_confirm_before_callback(void *data, const char *s, __unused int done)
if (tolower((u_char) s[0]) != 'y' || s[1] != '\0')
return (0);
- if (cmd_string_parse(cdata->cmd, &cmdlist, NULL, 0, &cause) != 0) {
+ cmdlist = cmd_string_parse(cdata->cmd, NULL, 0, &cause);
+ if (cmdlist == NULL) {
if (cause != NULL) {
new_item = cmdq_get_callback(cmd_confirm_before_error,
cause);