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.
This commit is contained in:
oni-link 2014-06-11 10:03:48 +02:00 committed by Justin M. Keyes
parent 4ccf1125ff
commit 90385163d5

View File

@ -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 {