summaryrefslogtreecommitdiff
path: root/src/cmdhist.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-11-14 14:36:41 +0000
committerBram Moolenaar <Bram@vim.org>2022-11-14 14:36:41 +0000
commitb298fe6cbae3b240b10dbd55d9c38d0cc8e033d3 (patch)
tree7e8f8ded593f4e777f1b2e84c4c82c783e35b644 /src/cmdhist.c
parentcf2594fbf34d9a6776bd9d33f845cb8ceb1e1cd0 (diff)
downloadvim-git-b298fe6cbae3b240b10dbd55d9c38d0cc8e033d3.tar.gz
patch 9.0.0878: Coverity warns for dead codev9.0.0878
Problem: Coverity warns for dead code. Solution: Remove the dead code.
Diffstat (limited to 'src/cmdhist.c')
-rw-r--r--src/cmdhist.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cmdhist.c b/src/cmdhist.c
index c46a3a63e..ea955478e 100644
--- a/src/cmdhist.c
+++ b/src/cmdhist.c
@@ -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)