Skip to content

Commit a29856f

Browse files
committed
patch 8.2.3436: check for optional bool type has confusing return type
Problem: Check for optional bool type has confusing return type. Solution: Explicitly return OK.
1 parent b1b6f4d commit a29856f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/typval.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,15 @@ check_for_bool_arg(typval_T *args, int idx)
459459
}
460460

461461
/*
462-
* Check for an optional bool argument at 'idx'
462+
* Check for an optional bool argument at 'idx'.
463+
* Return FAIL if the type is wrong.
463464
*/
464465
int
465466
check_for_opt_bool_arg(typval_T *args, int idx)
466467
{
467-
return (args[idx].v_type == VAR_UNKNOWN
468-
|| check_for_bool_arg(args, idx) != FAIL);
468+
if (args[idx].v_type == VAR_UNKNOWN)
469+
return OK;
470+
return check_for_bool_arg(args, idx);
469471
}
470472

471473
/*

src/version.c

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

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3436,
758760
/**/
759761
3435,
760762
/**/

0 commit comments

Comments
 (0)