aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/if_cscope.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-06-13 18:09:08 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-06-13 18:09:08 -0400
commit8bbeb4b480a72d0099a18c4d8200313600045231 (patch)
treecf153eceb121aef15e50631282e9171a24b74406 /src/nvim/if_cscope.c
parent5b3b3fd3ed4372866730ae857e8c09d6e5d1167d (diff)
parentd430f039d1255eaab55470b5613d83c24d030a64 (diff)
downloadrneovim-8bbeb4b480a72d0099a18c4d8200313600045231.tar.gz
rneovim-8bbeb4b480a72d0099a18c4d8200313600045231.tar.bz2
rneovim-8bbeb4b480a72d0099a18c4d8200313600045231.zip
Merge #743 'Replace vim_strncpy with strlcpy'
Diffstat (limited to 'src/nvim/if_cscope.c')
-rw-r--r--src/nvim/if_cscope.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/if_cscope.c b/src/nvim/if_cscope.c
index 0b3e06070c..ffc00f060a 100644
--- a/src/nvim/if_cscope.c
+++ b/src/nvim/if_cscope.c
@@ -295,7 +295,7 @@ int cs_fgets(char_u *buf, int size)
if ((p = cs_manage_matches(NULL, NULL, -1, Get)) == NULL)
return TRUE;
- vim_strncpy(buf, (char_u *)p, size - 1);
+ STRLCPY(buf, p, size);
return FALSE;
} /* cs_fgets */
@@ -2043,9 +2043,9 @@ static char *cs_resolve_file(int i, char *name)
/* If 'cscoperelative' is set and ppath is not set, use cscope.out
* path in path resolution. */
csdir = xmalloc(MAXPATHL);
- vim_strncpy(csdir, (char_u *)csinfo[i].fname,
+ STRLCPY(csdir, csinfo[i].fname,
path_tail((char_u *)csinfo[i].fname)
- - (char_u *)csinfo[i].fname);
+ - (char_u *)csinfo[i].fname + 1);
len += STRLEN(csdir);
}