{
hashitem_T *hi;
- clear_tv(&vimvars[idx].vv_tv);
vimvars[idx].vv_tv = *save_tv;
if (vimvars[idx].vv_type == VAR_UNKNOWN)
{
if (p_verbose == 0)
--emsg_off;
- vimvars[VV_VAL].vv_str = NULL;
restore_vimvar(VV_VAL, &save_val);
return list;
{
typval_T rettv;
char_u *s;
+ int retval = FAIL;
copy_tv(tv, &vimvars[VV_VAL].vv_tv);
s = expr;
if (eval1(&s, &rettv, TRUE) == FAIL)
- return FAIL;
+ goto theend;
if (*s != NUL) /* check for trailing chars after expr */
{
EMSG2(_(e_invexpr2), s);
- return FAIL;
+ goto theend;
}
if (map)
{
/* On type error, nothing has been removed; return FAIL to stop the
* loop. The error message was given by get_tv_number_chk(). */
if (error)
- return FAIL;
+ goto theend;
}
+ retval = OK;
+theend:
clear_tv(&vimvars[VV_VAL].vv_tv);
- return OK;
+ return retval;
}
/*