Mercurial > vim
changeset 31087:a220f176350a v9.0.0878
patch 9.0.0878: Coverity warns for dead code
Commit: https://github.com/vim/vim/commit/b298fe6cbae3b240b10dbd55d9c38d0cc8e033d3
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 14 14:36:41 2022 +0000
patch 9.0.0878: Coverity warns for dead code
Problem: Coverity warns for dead code.
Solution: Remove the dead code.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 14 Nov 2022 15:45:04 +0100 |
parents | 47d825028c38 |
children | c7c9ec57cd55 |
files | src/cmdhist.c src/version.c |
diffstat | 2 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)