mirror of
https://github.com/neovim/neovim.git
synced 2025-11-28 21:20:45 +00: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:
committed by
Justin M. Keyes
parent
4ccf1125ff
commit
90385163d5
@@ -1932,7 +1932,7 @@ void win_close_othertab(win_T *win, int free_buf, tabpage_T *tp)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* When closing the last window in a tab page remove the tab page. */
|
/* 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)
|
if (tp == first_tabpage)
|
||||||
first_tabpage = tp->tp_next;
|
first_tabpage = tp->tp_next;
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user