mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
Remove OOM test in set_context_in_menu_cmd()
This commit is contained in:

committed by
Thiago de Arruda

parent
c68410de52
commit
9a5b3eee5f
@@ -905,9 +905,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 = alloc((unsigned)(after_dot - arg));
|
path_name = xmalloc(after_dot - arg);
|
||||||
if (path_name == NULL)
|
|
||||||
return NULL;
|
|
||||||
vim_strncpy(path_name, arg, after_dot - arg - 1);
|
vim_strncpy(path_name, arg, after_dot - arg - 1);
|
||||||
}
|
}
|
||||||
name = path_name;
|
name = path_name;
|
||||||
|
Reference in New Issue
Block a user