0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2029: Coverity warns for not checking return value

Problem:    Coverity warns for not checking return value.
Solution:   Check that u_save_cursor() returns OK.
This commit is contained in:
Bram Moolenaar
2020-11-21 14:16:22 +01:00
parent 896ad2c33e
commit 5546688fb6
2 changed files with 6 additions and 3 deletions

View File

@@ -3871,8 +3871,9 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
else
{
(void)op_delete(oap);
if (oap->motion_type == MLINE && has_format_option(FO_AUTO))
u_save_cursor(); // cursor line wasn't saved yet
// save cursor line for undo if it wasn't saved yet
if (oap->motion_type == MLINE && has_format_option(FO_AUTO)
&& u_save_cursor() == OK)
auto_format(FALSE, TRUE);
}
break;

View File

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