diff options
author | oni-link <knil.ino@gmail.com> | 2014-06-11 10:03:48 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-20 02:41:14 -0400 |
commit | 90385163d5525a312e97b345e92e1dd1fadc301c (patch) | |
tree | 938e5a2f500a3c7e9afb7e8ae02246aa4395cf64 | |
parent | 4ccf1125ff569eccfc34abc4ad794044c5ab7455 (diff) | |
download | rneovim-90385163d5525a312e97b345e92e1dd1fadc301c.tar.gz rneovim-90385163d5525a312e97b345e92e1dd1fadc301c.tar.bz2 rneovim-90385163d5525a312e97b345e92e1dd1fadc301c.zip |
coverity/15010: Remove dead code. #829
In win_close_othertab: Code can never be reached because of a
logical contradiction (CWE-561).
Pointer tp cannot be NULL at this point, so conditional operator ? can
be replaced with its second expression.
-rw-r--r-- | src/nvim/window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index f6799be023..93440def39 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -1932,7 +1932,7 @@ void win_close_othertab(win_T *win, int free_buf, tabpage_T *tp) return; /* When closing the last window in a tab page remove the tab page. */ - if (tp == NULL ? firstwin == lastwin : tp->tp_firstwin == tp->tp_lastwin) { + if (tp->tp_firstwin == tp->tp_lastwin) { if (tp == first_tabpage) first_tabpage = tp->tp_next; else { |