diff options
Diffstat (limited to 'src/nvim/os/fs.c')
-rw-r--r-- | src/nvim/os/fs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index d0da37b8e7..451994241d 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -370,8 +370,8 @@ static bool is_executable_in_path(const char *name, char **abspath) char *path = xstrdup(path_env); #endif - size_t buf_len = strlen(name) + strlen(path) + 2; - char *buf = xmalloc(buf_len); + const size_t bufsize = strlen(name) + strlen(path) + 2; + char *buf = xmalloc(bufsize); // Walk through all entries in $PATH to check if "name" exists there and // is an executable file. @@ -382,7 +382,7 @@ static bool is_executable_in_path(const char *name, char **abspath) // Combine the $PATH segment with `name`. xmemcpyz(buf, p, (size_t)(e - p)); - (void)append_path(buf, name, buf_len); + (void)append_path(buf, name, bufsize); #ifdef MSWIN if (is_executable_ext(buf, abspath)) { |