Skip to content

Commit

Permalink
patch 8.2.3436: check for optional bool type has confusing return type
Browse files Browse the repository at this point in the history
Problem:    Check for optional bool type has confusing return type.
Solution:   Explicitly return OK.
  • Loading branch information
brammool committed Sep 13, 2021
1 parent b1b6f4d commit a29856f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/typval.c
Expand Up @@ -459,13 +459,15 @@ check_for_bool_arg(typval_T *args, int idx)
}

/*
* Check for an optional bool argument at 'idx'
* Check for an optional bool argument at 'idx'.
* Return FAIL if the type is wrong.
*/
int
check_for_opt_bool_arg(typval_T *args, int idx)
{
return (args[idx].v_type == VAR_UNKNOWN
|| check_for_bool_arg(args, idx) != FAIL);
if (args[idx].v_type == VAR_UNKNOWN)
return OK;
return check_for_bool_arg(args, idx);
}

/*
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -755,6 +755,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3436,
/**/
3435,
/**/
Expand Down

0 comments on commit a29856f

Please sign in to comment.