Hi
Attached patch removes 2 redundant 'if'
conditions in terminal.c.
Regards
Dominique
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/terminal.c b/src/terminal.c
index 744b7de..70f750b 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -509,13 +509,13 @@ ex_terminal(exarg_T *eap)
char_u *cmd;
char_u *tofree = NULL;
init_job_options(&opt);
cmd = eap->arg;
- while (*cmd && *cmd == '+' && *(cmd + 1) == '+')
+ while (*cmd == '+' && *(cmd + 1) == '+')
{
char_u *p, *ep;
cmd += 2;
p = skiptowhite(cmd);
ep = vim_strchr(cmd, '=');
@@ -3200,14 +3200,13 @@ f_term_wait(typval_T *argvars, typval_T *rettv UNUSED)
}
if (buf->b_term->tl_job->jv_channel == NULL)
/* channel is closed, nothing to do */
return;
/* Get the job status, this will detect a job that finished. */
- if ((buf->b_term->tl_job->jv_channel == NULL
- || !buf->b_term->tl_job->jv_channel->ch_keep_open)
+ if (!buf->b_term->tl_job->jv_channel->ch_keep_open
&& STRCMP(job_status(buf->b_term->tl_job), "dead") == 0)
{
/* The job is dead, keep reading channel I/O until the channel is
* closed. buf->b_term may become NULL if the terminal was closed while
* waiting. */
ch_log(NULL, "term_wait(): waiting for channel to close");