aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval/userfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval/userfunc.c')
-rw-r--r--src/nvim/eval/userfunc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index 11ca93cff9..8b47468aad 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -1761,14 +1761,14 @@ char_u *trans_function_name(char_u **pp, bool skip, int flags, funcdict_T *fdp,
} else if (lv.ll_tv->v_type == VAR_PARTIAL
&& lv.ll_tv->vval.v_partial != NULL) {
if (is_luafunc(lv.ll_tv->vval.v_partial) && *end == '.') {
- len = check_luafunc_name((const char *)end+1, true);
+ len = check_luafunc_name((const char *)end + 1, true);
if (len == 0) {
semsg(e_invexpr2, "v:lua");
goto theend;
}
name = xmallocz((size_t)len);
- memcpy(name, end+1, (size_t)len);
- *pp = (char_u *)end+1+len;
+ memcpy(name, end + 1, (size_t)len);
+ *pp = (char_u *)end + 1 + len;
} else {
name = vim_strsave(partial_name(lv.ll_tv->vval.v_partial));
*pp = (char_u *)end;
@@ -2269,11 +2269,10 @@ void ex_function(exarg_T *eap)
}
} else {
// skip ':' and blanks
- for (p = theline; ascii_iswhite(*p) || *p == ':'; p++) {
- }
+ for (p = theline; ascii_iswhite(*p) || *p == ':'; p++) {}
// Check for "endfunction".
- if (checkforcmd(&p, "endfunction", 4) && nesting-- == 0) {
+ if (checkforcmd((char **)&p, "endfunction", 4) && nesting-- == 0) {
if (*p == '!') {
p++;
}
@@ -2312,7 +2311,7 @@ void ex_function(exarg_T *eap)
}
// Check for defining a function inside this function.
- if (checkforcmd(&p, "function", 2)) {
+ if (checkforcmd((char **)&p, "function", 2)) {
if (*p == '!') {
p = skipwhite(p + 1);
}
@@ -2325,7 +2324,7 @@ void ex_function(exarg_T *eap)
}
// Check for ":append", ":change", ":insert".
- p = skip_range(p, NULL);
+ p = (char_u *)skip_range((char *)p, NULL);
if ((p[0] == 'a' && (!ASCII_ISALPHA(p[1]) || p[1] == 'p'))
|| (p[0] == 'c'
&& (!ASCII_ISALPHA(p[1])