aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroni-link <knil.ino@gmail.com>2014-06-11 10:03:48 +0200
committerJustin M. Keyes <justinkz@gmail.com>2014-06-20 02:41:14 -0400
commit90385163d5525a312e97b345e92e1dd1fadc301c (patch)
tree938e5a2f500a3c7e9afb7e8ae02246aa4395cf64 /src
parent4ccf1125ff569eccfc34abc4ad794044c5ab7455 (diff)
downloadrneovim-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.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/window.c2
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 {