comparison src/typval.c @ 25802:5ef704de7709 v8.2.3436

patch 8.2.3436: check for optional bool type has confusing return type Commit: https://github.com/vim/vim/commit/a29856fcdc41541c607437629c1c1f45951100a4 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 13 21:36:27 2021 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Mon, 13 Sep 2021 21:45:04 +0200
parents 15b54e0a576b
children 8d55e978f95b
comparison
equal deleted inserted replaced
25801:7124fbe5db04 25802:5ef704de7709
457 } 457 }
458 return OK; 458 return OK;
459 } 459 }
460 460
461 /* 461 /*
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.
463 */ 464 */
464 int 465 int
465 check_for_opt_bool_arg(typval_T *args, int idx) 466 check_for_opt_bool_arg(typval_T *args, int idx)
466 { 467 {
467 return (args[idx].v_type == VAR_UNKNOWN 468 if (args[idx].v_type == VAR_UNKNOWN)
468 || check_for_bool_arg(args, idx) != FAIL); 469 return OK;
470 return check_for_bool_arg(args, idx);
469 } 471 }
470 472
471 /* 473 /*
472 * Give an error and return FAIL unless "args[idx]" is a list. 474 * Give an error and return FAIL unless "args[idx]" is a list.
473 */ 475 */