From 52847a951802fda7a3ce36cdac77c34914b0ccca Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 15 Jan 2017 22:00:56 +0000 Subject: It is silly for cmd_list_parse to return an integer error when it could just return NULL. --- control.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'control.c') 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 { -- cgit