mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
It is silly for cmd_list_parse to return an integer error when it could
just return NULL.
This commit is contained in:
@ -96,7 +96,8 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
|
||||
free(shellcmd);
|
||||
if (cmd == NULL)
|
||||
return (CMD_RETURN_NORMAL);
|
||||
if (cmd_string_parse(cmd, &cmdlist, NULL, 0, &cause) != 0) {
|
||||
cmdlist = cmd_string_parse(cmd, NULL, 0, &cause);
|
||||
if (cmdlist == NULL) {
|
||||
if (cause != NULL) {
|
||||
cmdq_error(item, "%s", cause);
|
||||
free(cause);
|
||||
@ -167,7 +168,8 @@ cmd_if_shell_callback(struct job *job)
|
||||
if (cmd == NULL)
|
||||
goto out;
|
||||
|
||||
if (cmd_string_parse(cmd, &cmdlist, file, line, &cause) != 0) {
|
||||
cmdlist = cmd_string_parse(cmd, file, line, &cause);
|
||||
if (cmdlist == NULL) {
|
||||
if (cause != NULL)
|
||||
new_item = cmdq_get_callback(cmd_if_shell_error, cause);
|
||||
else
|
||||
|
Reference in New Issue
Block a user