Mercurial > vim
diff src/userfunc.c @ 20830:9064044fd4f6 v8.2.0967
patch 8.2.0967: unnecessary type casts for vim_strnsave()
Commit: https://github.com/vim/vim/commit/71ccd03ee8a43b20000214a9c99dcc90f039edca
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 12 22:59:11 2020 +0200
patch 8.2.0967: unnecessary type casts for vim_strnsave()
Problem: Unnecessary type casts for vim_strnsave().
Solution: Remove the type casts.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Jun 2020 23:00:04 +0200 |
parents | 9faab49c880f |
children | 1693ca876049 |
line wrap: on
line diff
--- a/src/userfunc.c +++ b/src/userfunc.c @@ -2699,7 +2699,7 @@ def_function(exarg_T *eap, char_u *name_ 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_ // 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_ // 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; }