diff options
author | Douglas Schneider <ds3@ualberta.ca> | 2014-05-26 08:35:11 -0600 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-13 18:08:21 -0400 |
commit | 4e2cbddaaae37ed9309e2332a2f5cb9adca5bd33 (patch) | |
tree | f200dc53b1d267cc656a00e7f448dc66bdb549e4 | |
parent | 7249729af6d00b2a3816d39304f24927b6454d74 (diff) | |
download | rneovim-4e2cbddaaae37ed9309e2332a2f5cb9adca5bd33.tar.gz rneovim-4e2cbddaaae37ed9309e2332a2f5cb9adca5bd33.tar.bz2 rneovim-4e2cbddaaae37ed9309e2332a2f5cb9adca5bd33.zip |
Replace vim_strncpy calls: os/fs.c
-rw-r--r-- | src/nvim/os/fs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index 48bc75cb8e..c8408d78e4 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -39,7 +39,7 @@ int os_dirname(char_u *buf, size_t len) int errno; if ((errno = uv_cwd((char *)buf, &len)) != kLibuvSuccess) { - vim_strncpy(buf, (char_u *)uv_strerror(errno), len - 1); + STRLCPY(buf, uv_strerror(errno), len); return FAIL; } return OK; @@ -123,7 +123,7 @@ static bool is_executable_in_path(const char_u *name) // Glue together the given directory from $PATH with name and save into // buf. - vim_strncpy(buf, (char_u *) path, e - path); + STRLCPY(buf, path, e - path + 1); append_path((char *) buf, (const char *) name, (int)buf_len); if (is_executable(buf)) { |