summaryrefslogtreecommitdiffstats
path: root/control.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 /control.c
parent30548461439f02ed8327f96748035685a1a26ace (diff)
It is silly for cmd_list_parse to return an integer error when it could
just return NULL.
Diffstat (limited to 'control.c')
-rw-r--r--control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/control.c b/control.c
index e9b1e8ea..64e9fec1 100644
--- a/control.c
+++ b/control.c
@@ -85,7 +85,8 @@ control_callback(struct client *c, int closed, __unused void *data)
break;
}
- if (cmd_string_parse(line, &cmdlist, NULL, 0, &cause) != 0) {
+ cmdlist = cmd_string_parse(line, NULL, 0, &cause);
+ if (cmdlist == NULL) {
item = cmdq_get_callback(control_error, cause);
cmdq_append(c, item);
} else {