Replace vim_strncpy calls: os_unix.c

This commit is contained in:
Douglas Schneider
2014-05-25 18:46:40 -06:00
committed by Justin M. Keyes
parent c37d4c5d12
commit d6e9b3caad

View File

@@ -409,9 +409,9 @@ int len /* buffer size, only used when name gets longer */
struct stat st2; struct stat st2;
/* Verify the inode is equal. */ /* Verify the inode is equal. */
vim_strncpy(newname, name, MAXPATHL); STRLCPY(newname, name, MAXPATHL + 1);
vim_strncpy(newname + (tail - name), (char_u *)dp->d_name, STRLCPY(newname + (tail - name), dp->d_name,
MAXPATHL - (tail - name)); MAXPATHL - (tail - name) + 1);
if (lstat((char *)newname, &st2) >= 0 if (lstat((char *)newname, &st2) >= 0
&& st.st_ino == st2.st_ino && st.st_ino == st2.st_ino
&& st.st_dev == st2.st_dev) { && st.st_dev == st2.st_dev) {