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/misc1.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/misc1.c')
-rw-r--r-- | src/misc1.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/misc1.c b/src/misc1.c index db76d9bfa..bab9e680a 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -1795,7 +1795,7 @@ vim_getenv(char_u *name, int *mustfree) if (p == exe_name || p == p_hf) #endif // check that the result is a directory name - p = vim_strnsave(p, (int)(pend - p)); + p = vim_strnsave(p, pend - p); if (p != NULL && !mch_isdir(p)) VIM_CLEAR(p); @@ -2576,7 +2576,7 @@ get_isolated_shell_name(void) #ifdef MSWIN p = gettail(p_sh); - p = vim_strnsave(p, (int)(skiptowhite(p) - p)); + p = vim_strnsave(p, skiptowhite(p) - p); #else p = skiptowhite(p_sh); if (*p == NUL) @@ -2593,7 +2593,7 @@ get_isolated_shell_name(void) for (p2 = p_sh; p2 < p; MB_PTR_ADV(p2)) if (vim_ispathsep(*p2)) p1 = p2 + 1; - p = vim_strnsave(p1, (int)(p - p1)); + p = vim_strnsave(p1, p - p1); } #endif return p; |