diff options
author | nicm <nicm> | 2017-01-15 22:00:56 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-01-15 22:00:56 +0000 |
commit | 52847a951802fda7a3ce36cdac77c34914b0ccca (patch) | |
tree | 7e5ad465e719d32f2a7d9a7c3469dec6d12448a4 /cmd-command-prompt.c | |
parent | 30548461439f02ed8327f96748035685a1a26ace (diff) |
It is silly for cmd_list_parse to return an integer error when it could
just return NULL.
Diffstat (limited to 'cmd-command-prompt.c')
-rw-r--r-- | cmd-command-prompt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-command-prompt.c b/cmd-command-prompt.c index dec40bf2..3cc5b2fb 100644 --- a/cmd-command-prompt.c +++ b/cmd-command-prompt.c @@ -175,7 +175,8 @@ cmd_command_prompt_callback(void *data, const char *s, int done) return (1); } - if (cmd_string_parse(new_template, &cmdlist, NULL, 0, &cause) != 0) { + cmdlist = cmd_string_parse(new_template, NULL, 0, &cause); + if (cmdlist == NULL) { if (cause != NULL) { new_item = cmdq_get_callback(cmd_command_prompt_error, cause); |