diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-12 22:59:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-12 22:59:11 +0200 |
commit | 71ccd03ee8a43b20000214a9c99dcc90f039edca (patch) | |
tree | b5e89de8afbba2a8981d68b578514df046cb4aad /src/userfunc.c | |
parent | 722e505d1a55dfde5ab62241d10da91d2e10c3c1 (diff) | |
download | vim-git-71ccd03ee8a43b20000214a9c99dcc90f039edca.tar.gz |
patch 8.2.0967: unnecessary type casts for vim_strnsave()v8.2.0967
Problem: Unnecessary type casts for vim_strnsave().
Solution: Remove the type casts.
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index e2658fe59..bd229b4d9 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -2699,7 +2699,7 @@ def_function(exarg_T *eap, char_u *name_arg) p = skip_type(ret_type); if (p > ret_type) { - ret_type = vim_strnsave(ret_type, (int)(p - ret_type)); + ret_type = vim_strnsave(ret_type, p - ret_type); p = skipwhite(p); } else @@ -2972,12 +2972,12 @@ def_function(exarg_T *eap, char_u *name_arg) // Ignore leading white space. p = skipwhite(p + 4); heredoc_trimmed = vim_strnsave(theline, - (int)(skipwhite(theline) - theline)); + skipwhite(theline) - theline); } if (*p == NUL) skip_until = vim_strsave((char_u *)"."); else - skip_until = vim_strnsave(p, (int)(skiptowhite(p) - p)); + skip_until = vim_strnsave(p, skiptowhite(p) - p); do_concat = FALSE; is_heredoc = TRUE; } @@ -3002,9 +3002,9 @@ def_function(exarg_T *eap, char_u *name_arg) // Ignore leading white space. p = skipwhite(p + 4); heredoc_trimmed = vim_strnsave(theline, - (int)(skipwhite(theline) - theline)); + skipwhite(theline) - theline); } - skip_until = vim_strnsave(p, (int)(skiptowhite(p) - p)); + skip_until = vim_strnsave(p, skiptowhite(p) - p); do_concat = FALSE; is_heredoc = TRUE; } |