aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/menu.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/menu.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/menu.c')
-rw-r--r--src/nvim/menu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/menu.c b/src/nvim/menu.c
index bfafeb0be2..4f45aa9e34 100644
--- a/src/nvim/menu.c
+++ b/src/nvim/menu.c
@@ -888,7 +888,7 @@ char_u *set_context_in_menu_cmd(expand_T *xp, char_u *cmd, char_u *arg, int forc
menu = root_menu;
if (after_dot != arg) {
path_name = xmalloc(after_dot - arg);
- vim_strncpy(path_name, arg, after_dot - arg - 1);
+ STRLCPY(path_name, arg, after_dot - arg);
}
name = path_name;
while (name != NULL && *name) {
@@ -1004,9 +1004,9 @@ char_u *get_menu_names(expand_T *xp, int idx)
if (menu->modes & expand_modes) {
if (menu->children != NULL) {
if (should_advance)
- vim_strncpy(tbuffer, menu->en_dname, TBUFFER_LEN - 2);
+ STRLCPY(tbuffer, menu->en_dname, TBUFFER_LEN - 1);
else {
- vim_strncpy(tbuffer, menu->dname, TBUFFER_LEN - 2);
+ STRLCPY(tbuffer, menu->dname, TBUFFER_LEN - 1);
if (menu->en_dname == NULL)
should_advance = TRUE;
}