From 9a1a2b9a59390a2a74c0672b3ecdf58e1ad2efea Mon Sep 17 00:00:00 2001 From: Douglas Schneider Date: Mon, 26 May 2014 19:42:35 -0600 Subject: Replace vim_strncpy calls: menu.c --- src/nvim/menu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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; } -- cgit