summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-07-18 21:58:11 +0000
committerBram Moolenaar <Bram@vim.org>2005-07-18 21:58:11 +0000
commitce0842a6ee214621ccf03693ab77a94851c09ab0 (patch)
tree1dd3965d94b6497335e9c7ca77c0e02a58003218 /src/ex_getln.c
parentbbebc857507f24c82cd5bb2f80305b74390b4611 (diff)
updated for version 7.0109v7.0109
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 1192622544..c96f114883 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -3239,10 +3239,7 @@ ExpandOne(xp, str, orig, options, mode)
}
ss = alloc((unsigned)len + 1);
if (ss)
- {
- STRNCPY(ss, xp->xp_files[0], len);
- ss[len] = NUL;
- }
+ vim_strncpy(ss, xp->xp_files[0], (size_t)len);
findex = -1; /* next p_wc gets first one */
}
@@ -3749,8 +3746,7 @@ addstar(fname, len, context)
retval = alloc(len + 4);
if (retval != NULL)
{
- STRNCPY(retval, fname, len);
- retval[len] = NUL;
+ vim_strncpy(retval, fname, len);
/*
* Don't add a star to ~, ~user, $var or `cmd`.