0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.1.0179: redundant condition for boundary check

Problem:    Redundant condition for boundary check.
Solution:   Remove the condition. (Dominique Pelle). Change FALSE to FAIL.
This commit is contained in:
Bram Moolenaar
2018-07-13 16:31:19 +02:00
parent e76c4b237d
commit efc81331e7
2 changed files with 4 additions and 4 deletions

View File

@@ -266,10 +266,8 @@ u_save(linenr_T top, linenr_T bot)
if (undo_off) if (undo_off)
return OK; return OK;
if (top > curbuf->b_ml.ml_line_count if (top >= bot || bot > curbuf->b_ml.ml_line_count + 1)
|| top >= bot return FAIL; // rely on caller to give an error message
|| bot > curbuf->b_ml.ml_line_count + 1)
return FALSE; /* rely on caller to do error messages */
if (top + 2 == bot) if (top + 2 == bot)
u_saveline((linenr_T)(top + 1)); u_saveline((linenr_T)(top + 1));

View File

@@ -789,6 +789,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
179,
/**/ /**/
178, 178,
/**/ /**/