vim-patch:7.4.2330

Problem:    Coverity complains about not checking curwin to be NULL.
Solution:   Use firstwin to avoid the warning.

030cddc7ec
This commit is contained in:
lonerover
2017-03-23 22:54:30 +08:00
parent 20e7652b69
commit 85ba14af6a
2 changed files with 5 additions and 4 deletions

View File

@@ -627,10 +627,11 @@ void buf_freeall(buf_T *buf, int flags)
*/ */
if (buf == curbuf && !is_curbuf) if (buf == curbuf && !is_curbuf)
return; return;
diff_buf_delete(buf); /* Can't use 'diff' for unloaded buffer. */ diff_buf_delete(buf); // Can't use 'diff' for unloaded buffer.
/* Remove any ownsyntax, unless exiting. */ // Remove any ownsyntax, unless exiting.
if (firstwin != NULL && curwin->w_buffer == buf) if (curwin != NULL && curwin->w_buffer == buf) {
reset_synblock(curwin); reset_synblock(curwin);
}
/* No folds in an empty buffer. */ /* No folds in an empty buffer. */
FOR_ALL_TAB_WINDOWS(tp, win) { FOR_ALL_TAB_WINDOWS(tp, win) {

View File

@@ -111,7 +111,7 @@ static int included_patches[] = {
2333, 2333,
// 2332 NA // 2332 NA
2331, 2331,
// 2330, 2330,
2329, 2329,
2328, 2328,
// 2327 NA // 2327 NA