Skip to content

Commit 5546688

Browse files
committed
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.
1 parent 896ad2c commit 5546688

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/ops.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3871,9 +3871,10 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
38713871
else
38723872
{
38733873
(void)op_delete(oap);
3874-
if (oap->motion_type == MLINE && has_format_option(FO_AUTO))
3875-
u_save_cursor(); // cursor line wasn't saved yet
3876-
auto_format(FALSE, TRUE);
3874+
// save cursor line for undo if it wasn't saved yet
3875+
if (oap->motion_type == MLINE && has_format_option(FO_AUTO)
3876+
&& u_save_cursor() == OK)
3877+
auto_format(FALSE, TRUE);
38773878
}
38783879
break;
38793880

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2029,
753755
/**/
754756
2028,
755757
/**/

0 commit comments

Comments
 (0)