vim-patch:9.1.0649: Wrong comment for "len" argument of call_simple_func()

Problem:  Wrong comment for "len" argument of call_simple_func().
Solution: Remove the "or -1 to use strlen()".  Also change its type to
          size_t to remove one cast. (zeertzjq)

closes: vim/vim#15410

c1ed788c1b
This commit is contained in:
zeertzjq
2024-08-02 11:49:00 +08:00
parent 582bf4f1e1
commit 6d722f3309
2 changed files with 4 additions and 4 deletions

View File

@@ -2630,7 +2630,7 @@ static int may_call_simple_func(char *arg, typval_T *rettv)
if (parens != NULL && *skipwhite(parens + 2) == NUL) {
char *p = strncmp(arg, "<SNR>", 5) == 0 ? skipdigits(arg + 5) : arg;
if (to_name_end(p, true) == parens) {
r = call_simple_func(arg, (int)(parens - arg), rettv);
r = call_simple_func(arg, (size_t)(parens - arg), rettv);
}
}
return r;