Hi Bram,
2017/3/22 Wed 5:58:23 UTC+9 Bram Moolenaar wrote:
> Patch 8.0.0502
> Problem: Coverity complains about possible NULL pointer.
> Solution: Add an assert(), let's see if this works on all systems.
> Files: src/window.c
>
>
> *** ../vim-8.0.0501/src/window.c 2017-03-19 20:22:31.210585166 +0100
> --- src/window.c 2017-03-21 21:51:24.317409884 +0100
> ***************
> *** 3806,3811 ****
> --- 3806,3812 ----
> for (ptp = first_tabpage; ptp != NULL && ptp->tp_next != tab;
> ptp = ptp->tp_next)
> ;
> + assert(ptp != NULL);
> ptp->tp_next = tab->tp_next;
> }
>
If this assertion is true, can't we remove the same condition in the above
`for` statement?
for (ptp = first_tabpage; ptp->tp_next != tab; ptp = ptp->tp_next)
Regards,
Ken Takata
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.