diff options
author | Douglas Schneider <ds3@ualberta.ca> | 2014-05-26 19:49:50 -0600 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-13 18:08:21 -0400 |
commit | a501d7a94002458caf7ea1f74e9fd941fd7022c1 (patch) | |
tree | 18522d8bd2c3d63bbf35d6a784f7a69dc1e376f7 | |
parent | 9a1a2b9a59390a2a74c0672b3ecdf58e1ad2efea (diff) | |
download | rneovim-a501d7a94002458caf7ea1f74e9fd941fd7022c1.tar.gz rneovim-a501d7a94002458caf7ea1f74e9fd941fd7022c1.tar.bz2 rneovim-a501d7a94002458caf7ea1f74e9fd941fd7022c1.zip |
Replace vim_strncpy calls: ex_getln.c
-rw-r--r-- | src/nvim/ex_getln.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 0b00e458ff..994b2f510f 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -3372,7 +3372,7 @@ addstar ( } else { retval = xmalloc(len + 4); if (retval != NULL) { - vim_strncpy(retval, fname, len); + STRLCPY(retval, fname, len + 1); /* * Don't add a star to *, ~, ~user, $var or `cmd`. @@ -3896,10 +3896,10 @@ expand_shellcmd ( l = e - s; if (l > MAXPATHL - 5) break; - vim_strncpy(buf, s, l); + STRLCPY(buf, s, l + 1); add_pathsep(buf); l = STRLEN(buf); - vim_strncpy(buf + l, pat, MAXPATHL - 1 - l); + STRLCPY(buf + l, pat, MAXPATHL - l); /* Expand matches in one directory of $PATH. */ ret = expand_wildcards(1, &buf, num_file, file, flags); |