diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2025-02-05 23:09:29 +0000 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2025-02-05 23:09:29 +0000 |
| commit | d5f194ce780c95821a855aca3c19426576d28ae0 (patch) | |
| tree | d45f461b19f9118ad2bb1f440a7a08973ad18832 /src/nvim/os/fs.c | |
| parent | c5d770d311841ea5230426cc4c868e8db27300a8 (diff) | |
| parent | 44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff) | |
| download | rneovim-rahm.tar.gz rneovim-rahm.tar.bz2 rneovim-rahm.zip | |
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)) { |