mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 19:18:34 +00:00
Replace vim_strncpy calls: menu.c
This commit is contained in:

committed by
Justin M. Keyes

parent
30f5cd6c30
commit
9a1a2b9a59
@@ -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;
|
menu = root_menu;
|
||||||
if (after_dot != arg) {
|
if (after_dot != arg) {
|
||||||
path_name = xmalloc(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;
|
name = path_name;
|
||||||
while (name != NULL && *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->modes & expand_modes) {
|
||||||
if (menu->children != NULL) {
|
if (menu->children != NULL) {
|
||||||
if (should_advance)
|
if (should_advance)
|
||||||
vim_strncpy(tbuffer, menu->en_dname, TBUFFER_LEN - 2);
|
STRLCPY(tbuffer, menu->en_dname, TBUFFER_LEN - 1);
|
||||||
else {
|
else {
|
||||||
vim_strncpy(tbuffer, menu->dname, TBUFFER_LEN - 2);
|
STRLCPY(tbuffer, menu->dname, TBUFFER_LEN - 1);
|
||||||
if (menu->en_dname == NULL)
|
if (menu->en_dname == NULL)
|
||||||
should_advance = TRUE;
|
should_advance = TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user