aboutsummaryrefslogtreecommitdiff
path: root/cmd-set-hook.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-01-16 00:01:10 +0000
committerThomas Adam <thomas@xteddy.org>2017-01-16 00:01:10 +0000
commit7b606457320995e2f4790b758a13d26d383ae213 (patch)
treee57056522b598aee1c15e88ce8607052aa97b7a3 /cmd-set-hook.c
parentc9fcb76651cd6685ad33b845bcd0a21771964d37 (diff)
parent52847a951802fda7a3ce36cdac77c34914b0ccca (diff)
downloadrtmux-7b606457320995e2f4790b758a13d26d383ae213.tar.gz
rtmux-7b606457320995e2f4790b758a13d26d383ae213.tar.bz2
rtmux-7b606457320995e2f4790b758a13d26d383ae213.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-set-hook.c')
-rw-r--r--cmd-set-hook.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-set-hook.c b/cmd-set-hook.c
index 2685fc8d..fff7ccd7 100644
--- a/cmd-set-hook.c
+++ b/cmd-set-hook.c
@@ -115,7 +115,8 @@ cmd_set_hook_exec(struct cmd *self, struct cmdq_item *item)
cmdq_error(item, "no command to set hook: %s", name);
return (CMD_RETURN_ERROR);
}
- if (cmd_string_parse(cmd, &cmdlist, NULL, 0, &cause) != 0) {
+ cmdlist = cmd_string_parse(cmd, NULL, 0, &cause);
+ if (cmdlist == NULL) {
if (cause != NULL) {
cmdq_error(item, "%s", cause);
free(cause);