From c37d4c5d12dece5507b265411a98214a5602c7d0 Mon Sep 17 00:00:00 2001 From: Douglas Schneider Date: Sun, 25 May 2014 18:30:32 -0600 Subject: Replace vim_strncpy calls: file_search.c --- src/nvim/file_search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c index 2e6cc616e5..f6a052255b 100644 --- a/src/nvim/file_search.c +++ b/src/nvim/file_search.c @@ -307,7 +307,7 @@ vim_findfile_init ( if (!vim_isAbsName(rel_fname) && len + 1 < MAXPATHL) { /* Make the start dir an absolute path name. */ - vim_strncpy(ff_expand_buffer, rel_fname, len); + STRLCPY(ff_expand_buffer, rel_fname, len + 1); search_ctx->ffsc_start_dir = FullName_save(ff_expand_buffer, FALSE); } else search_ctx->ffsc_start_dir = vim_strnsave(rel_fname, len); @@ -1092,7 +1092,7 @@ static int ff_check_visited(ff_visited_T **visited_list, char_u *fname, char_u * // For a URL we only compare the name, otherwise we compare the // device/inode. if (path_with_url(fname)) { - vim_strncpy(ff_expand_buffer, fname, MAXPATHL - 1); + STRLCPY(ff_expand_buffer, fname, MAXPATHL); url = true; } else { ff_expand_buffer[0] = NUL; -- cgit