(mcview_growbuf_read_until): the NULL check is unnecessary...

...because the pointer can't be NULL.

Found by Coverity.
Coverity id #110819.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2020-12-21 09:52:45 +00:00 committed by Andrew Borodin
parent f57e69ad29
commit a68f2d1202

View File

@ -205,15 +205,13 @@ mcview_growbuf_read_until (WView * view, off_t ofs)
g_free (err_msg);
}
if (view->ds_stdio_pipe != NULL)
{
/* when switch from parse to raw mode and back,
* do not close the already closed pipe after following loop:
* mcview_growbuf_read_until() -> mcview_show_error() ->
* MSG_DRAW -> mcview_display() -> mcview_get_byte() -> mcview_growbuf_read_until()
*/
mcview_growbuf_done (view);
}
/* when switch from parse to raw mode and back,
* do not close the already closed pipe after following loop:
* mcview_growbuf_read_until() -> mcview_show_error() ->
* MSG_DRAW -> mcview_display() -> mcview_get_byte() -> mcview_growbuf_read_until()
*/
mcview_growbuf_done (view);
mcview_display (view);
return;
}