1
0
forked from aniani/vim

patch 8.2.0967: unnecessary type casts for vim_strnsave()

Problem:    Unnecessary type casts for vim_strnsave().
Solution:   Remove the type casts.
This commit is contained in:
Bram Moolenaar
2020-06-12 22:59:11 +02:00
parent 722e505d1a
commit 71ccd03ee8
31 changed files with 66 additions and 64 deletions

View File

@@ -1810,7 +1810,7 @@ menu_text(char_u *str, int *mnemonic, char_u **actext)
{
if (actext != NULL)
*actext = vim_strsave(p + 1);
text = vim_strnsave(str, (int)(p - str));
text = vim_strnsave(str, p - str);
}
else
text = vim_strsave(str);
@@ -2716,7 +2716,7 @@ ex_menutranslate(exarg_T *eap UNUSED)
if (from != NULL)
{
from_noamp = menu_text(from, NULL, NULL);
to = vim_strnsave(to, (int)(arg - to));
to = vim_strnsave(to, arg - to);
if (from_noamp != NULL && to != NULL)
{
menu_translate_tab_and_shift(from);