diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-08-09 17:43:45 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-08-09 17:43:45 +0200 |
commit | 9358f076a3b098c9a6cf783e97d5269f9d0da972 (patch) | |
tree | 2e004e2e8286325e42b64e6e14a9446b4d2bfa27 /src | |
parent | 795b9c9da93a36db72c3abacd8d1b4e4486b1b3e (diff) | |
download | weechat-9358f076a3b098c9a6cf783e97d5269f9d0da972.zip |
exec: invert a condition to make code more readable
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/exec/exec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/exec/exec.c b/src/plugins/exec/exec.c index b337d6f45..00a8d127e 100644 --- a/src/plugins/exec/exec.c +++ b/src/plugins/exec/exec.c @@ -135,10 +135,11 @@ exec_add () new_exec_cmd->prev_cmd = last_exec_cmd; new_exec_cmd->next_cmd = NULL; - if (!exec_cmds) - exec_cmds = new_exec_cmd; - else + if (exec_cmds) last_exec_cmd->next_cmd = new_exec_cmd; + else + exec_cmds = new_exec_cmd; + last_exec_cmd = new_exec_cmd; new_exec_cmd->number = number; |