diff options
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r-- | src/nvim/ex_eval.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index 976a19300b..fa70f762a2 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -479,7 +479,7 @@ static int throw_exception(void *value, except_type_T type, char *cmdname) } excp->type = type; - excp->throw_name = (char *)vim_strsave(sourcing_name == NULL ? (char_u *)"" : sourcing_name); + excp->throw_name = xstrdup(sourcing_name == NULL ? "" : sourcing_name); excp->throw_lnum = sourcing_lnum; if (p_verbose >= 13 || debug_break_level > 0) { @@ -1361,18 +1361,18 @@ void ex_catch(exarg_T *eap) save_char = *end; *end = NUL; } - save_cpo = (char *)p_cpo; - p_cpo = (char_u *)""; + save_cpo = p_cpo; + p_cpo = ""; // Disable error messages, it will make current exception // invalid emsg_off++; - regmatch.regprog = vim_regcomp((char_u *)pat, RE_MAGIC + RE_STRING); + regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING); emsg_off--; regmatch.rm_ic = false; if (end != NULL) { *end = save_char; } - p_cpo = (char_u *)save_cpo; + p_cpo = save_cpo; if (regmatch.regprog == NULL) { semsg(_(e_invarg2), pat); } else { |