summaryrefslogtreecommitdiffstats
path: root/cmd-display-panes.c
diff options
context:
space:
mode:
authornicm <nicm>2017-01-15 22:00:56 +0000
committernicm <nicm>2017-01-15 22:00:56 +0000
commit52847a951802fda7a3ce36cdac77c34914b0ccca (patch)
tree7e5ad465e719d32f2a7d9a7c3469dec6d12448a4 /cmd-display-panes.c
parent30548461439f02ed8327f96748035685a1a26ace (diff)
It is silly for cmd_list_parse to return an integer error when it could
just return NULL.
Diffstat (limited to 'cmd-display-panes.c')
-rw-r--r--cmd-display-panes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-display-panes.c b/cmd-display-panes.c
index 65813804..e670c1b9 100644
--- a/cmd-display-panes.c
+++ b/cmd-display-panes.c
@@ -90,7 +90,8 @@ cmd_display_panes_callback(struct client *c, struct window_pane *wp)
xasprintf(&expanded, "%%%u", wp->id);
cmd = cmd_template_replace(template, expanded, 1);
- if (cmd_string_parse(cmd, &cmdlist, NULL, 0, &cause) != 0) {
+ cmdlist = cmd_string_parse(cmd, NULL, 0, &cause);
+ if (cmdlist == NULL) {
if (cause != NULL) {
new_item = cmdq_get_callback(cmd_display_panes_error,
cause);