It is silly for cmd_list_parse to return an integer error when it could

just return NULL.
This commit is contained in:
nicm
2017-01-15 22:00:56 +00:00
parent 3054846143
commit 52847a9518
11 changed files with 31 additions and 45 deletions

View File

@ -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 {