aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_eval.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-11-28 18:11:41 +0100
committerGitHub <noreply@github.com>2022-11-28 18:11:41 +0100
commitccd17543f32a892814c3d32eb5e979722b843da9 (patch)
treef4768eb7d7be52402ccd55e3e4e04aecceab3e42 /src/nvim/ex_eval.c
parentb2bb3973d9c7f25acfead2718d74fcf5b1e4551e (diff)
parent3b96ccf7d35be90e49029dec76344d3d92ad91dc (diff)
downloadrneovim-ccd17543f32a892814c3d32eb5e979722b843da9.tar.gz
rneovim-ccd17543f32a892814c3d32eb5e979722b843da9.tar.bz2
rneovim-ccd17543f32a892814c3d32eb5e979722b843da9.zip
Merge pull request #21200 from dundargoc/refactor/char_u/15
refactor: replace char_u with char 15 - remove STRNLEN and STRNCPY
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r--src/nvim/ex_eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c
index db0b20036f..f696ab3900 100644
--- a/src/nvim/ex_eval.c
+++ b/src/nvim/ex_eval.c
@@ -254,7 +254,7 @@ bool cause_errthrow(const char *mesg, bool severe, bool *ignore)
// Skip the extra "Vim " prefix for message "E458".
tmsg = elem->msg;
- if (STRNCMP(tmsg, "Vim E", 5) == 0
+ if (strncmp(tmsg, "Vim E", 5) == 0
&& ascii_isdigit(tmsg[5])
&& ascii_isdigit(tmsg[6])
&& ascii_isdigit(tmsg[7])
@@ -448,7 +448,7 @@ static int throw_exception(void *value, except_type_T type, char *cmdname)
// would be treated differently from real interrupt or error exceptions
// when no active try block is found, see do_cmdline().
if (type == ET_USER) {
- if (STRNCMP((char_u *)value, "Vim", 3) == 0
+ if (strncmp(value, "Vim", 3) == 0
&& (((char_u *)value)[3] == NUL || ((char_u *)value)[3] == ':'
|| ((char_u *)value)[3] == '(')) {
emsg(_("E608: Cannot :throw exceptions with 'Vim' prefix"));