mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
4ccf1125ff
commit
90385163d5
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user