]> granicus.if.org Git - vim/commitdiff
patch 7.4.2330 v7.4.2330
authorBram Moolenaar <Bram@vim.org>
Sun, 4 Sep 2016 21:41:42 +0000 (23:41 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 4 Sep 2016 21:41:42 +0000 (23:41 +0200)
Problem:    Coverity complains about not checking curwin to be NULL.
Solution:   Use firstwin to avoid the warning.

src/buffer.c
src/version.c

index ac37685aa62db1fd4be76d33b5c92dc9e5c326ba..398fee7b6f3d28829caecfb1c523eac876e110d8 100644 (file)
@@ -707,7 +707,7 @@ buf_freeall(buf_T *buf, int flags)
     int                is_curbuf = (buf == curbuf);
     bufref_T   bufref;
 # ifdef FEAT_WINDOWS
-    int                is_curwin = (curwin!= NULL && curwin->w_buffer == buf);
+    int                is_curwin = (curwin != NULL && curwin->w_buffer == buf);
     win_T      *the_curwin = curwin;
     tabpage_T  *the_curtab = curtab;
 # endif
@@ -772,7 +772,7 @@ buf_freeall(buf_T *buf, int flags)
 #endif
 #ifdef FEAT_SYN_HL
     /* Remove any ownsyntax, unless exiting. */
-    if (firstwin != NULL && curwin->w_buffer == buf)
+    if (curwin != NULL && curwin->w_buffer == buf)
        reset_synblock(curwin);
 #endif
 
@@ -788,7 +788,7 @@ buf_freeall(buf_T *buf, int flags)
                clearFolding(win);
     }
 # else
-    if (curwin->w_buffer == buf)
+    if (curwin != NULL && curwin->w_buffer == buf)
        clearFolding(curwin);
 # endif
 #endif
index 42eeaa84e5af7fcd61ba4ac5914a22eff40dd858..31324c49fe669f3c383cea3e4e2b9f623a8ad118 100644 (file)
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2330,
 /**/
     2329,
 /**/