aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDouglas Schneider <ds3@ualberta.ca>2014-05-29 07:33:07 -0600
committerJustin M. Keyes <justinkz@gmail.com>2014-06-13 18:08:21 -0400
commita81f2dbe6ec4f5da188ad8c598f821655c11167f (patch)
tree62ebd90371b4e334f81bc68413784ce6d3628869 /src
parent2a0784731d3e11840a62fe1e65eb7e8bd7167d71 (diff)
downloadrneovim-a81f2dbe6ec4f5da188ad8c598f821655c11167f.tar.gz
rneovim-a81f2dbe6ec4f5da188ad8c598f821655c11167f.tar.bz2
rneovim-a81f2dbe6ec4f5da188ad8c598f821655c11167f.zip
Replace vim_strncpy calls: misc1.c
Diffstat (limited to 'src')
-rw-r--r--src/nvim/misc1.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c
index cf9a65d2da..7e6dec119b 100644
--- a/src/nvim/misc1.c
+++ b/src/nvim/misc1.c
@@ -503,7 +503,7 @@ open_line (
+ (second_line_indent > 0 ? second_line_indent : 0) + 1);
allocated = leader; /* remember to free it later */
- vim_strncpy(leader, saved_line, lead_len);
+ STRLCPY(leader, saved_line, lead_len + 1);
/*
* Replace leader with lead_repl, right or left adjusted
@@ -2560,11 +2560,9 @@ void msgmore(long n)
if (pn > p_report) {
if (pn == 1) {
if (n > 0)
- vim_strncpy(msg_buf, (char_u *)_("1 more line"),
- MSG_BUF_LEN - 1);
+ STRLCPY(msg_buf, _("1 more line"), MSG_BUF_LEN);
else
- vim_strncpy(msg_buf, (char_u *)_("1 line less"),
- MSG_BUF_LEN - 1);
+ STRLCPY(msg_buf, _("1 line less"), MSG_BUF_LEN);
} else {
if (n > 0)
vim_snprintf((char *)msg_buf, MSG_BUF_LEN,
@@ -3109,7 +3107,7 @@ char_u *get_env_name(expand_T *xp, int idx)
static char_u name[ENVNAMELEN];
char *envname = os_getenvname_at_index(idx);
if (envname) {
- vim_strncpy(name, (char_u *)envname, ENVNAMELEN - 1);
+ STRLCPY(name, envname, ENVNAMELEN);
free(envname);
return name;
} else {