]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0878: Coverity warns for dead code v9.0.0878
authorBram Moolenaar <Bram@vim.org>
Mon, 14 Nov 2022 14:36:41 +0000 (14:36 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 14 Nov 2022 14:36:41 +0000 (14:36 +0000)
Problem:    Coverity warns for dead code.
Solution:   Remove the dead code.

src/cmdhist.c
src/version.c

index c46a3a63ebcc32e93df1532a0ae7d71bd340f506..ea955478ef083d7b122c4d981474c1167dacbdad 100644 (file)
@@ -137,7 +137,7 @@ init_history(void)
     // history length changed
     for (type = 0; type < HIST_COUNT; ++type)   // adjust the tables
     {
-       if (newlen)
+       if (newlen > 0)
        {
            temp = ALLOC_MULT(histentry_T, newlen);
            if (temp == NULL)   // out of memory!
@@ -157,9 +157,6 @@ init_history(void)
        else
            temp = NULL;
 
-       if (newlen != 0 && temp == NULL)
-           continue;
-
        if (hisidx[type] < 0)           // there are no entries yet
        {
            for (i = 0; i < newlen; ++i)
index a764712188da2efa2ec18ebde868dcb248b5e215..f294ed58b10016b2161c492e85697fd0891fe95d 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    878,
 /**/
     877,
 /**/