aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os/env.c')
-rw-r--r--src/nvim/os/env.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c
index 4da3e312c9..2cf56f0201 100644
--- a/src/nvim/os/env.c
+++ b/src/nvim/os/env.c
@@ -561,14 +561,11 @@ void home_replace(buf_T *buf, char_u *src, char_u *dst, int dstlen, bool one)
homedir_env = NULL;
if (homedir_env != NULL && vim_strchr(homedir_env, '~') != NULL) {
- int usedlen = 0;
- int flen;
- char_u *fbuf = NULL;
-
- flen = (int)STRLEN(homedir_env);
- (void)modify_fname((char_u *)":p", &usedlen,
- &homedir_env, &fbuf, &flen);
- flen = (int)STRLEN(homedir_env);
+ size_t usedlen = 0;
+ size_t flen = STRLEN(homedir_env);
+ char_u *fbuf = NULL;
+ (void)modify_fname((char_u *)":p", &usedlen, &homedir_env, &fbuf, &flen);
+ flen = STRLEN(homedir_env);
if (flen > 0 && vim_ispathsep(homedir_env[flen - 1]))
/* Remove the trailing / that is added to a directory. */
homedir_env[flen - 1] = NUL;