From 90385163d5525a312e97b345e92e1dd1fadc301c Mon Sep 17 00:00:00 2001 From: oni-link Date: Wed, 11 Jun 2014 10:03:48 +0200 Subject: 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. --- src/nvim/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 { -- cgit