1
0
forked from aniani/vim

patch 8.0.1753: various warnings from a static analyser

Problem:    Various warnings from a static analyser
Solution:   Add type casts, remove unneeded conditions. (Christian Brabandt,
            closes #2770)
This commit is contained in:
Bram Moolenaar
2018-04-24 15:19:04 +02:00
parent a2aa8a2b22
commit 1c17ffa461
9 changed files with 15 additions and 13 deletions

View File

@@ -10194,7 +10194,7 @@ set_buffer_lines(buf_T *buf, linenr_T lnum, typval_T *lines, typval_T *rettv)
}
rettv->vval.v_number = 1; /* FAIL */
if (line == NULL || lnum < 1 || lnum > curbuf->b_ml.ml_line_count + 1)
if (line == NULL || lnum > curbuf->b_ml.ml_line_count + 1)
break;
/* When coming here from Insert mode, sync undo, so that this can be