Mercurial > vim
diff src/menu.c @ 20830:9064044fd4f6 v8.2.0967
patch 8.2.0967: unnecessary type casts for vim_strnsave()
Commit: https://github.com/vim/vim/commit/71ccd03ee8a43b20000214a9c99dcc90f039edca
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 12 22:59:11 2020 +0200
patch 8.2.0967: unnecessary type casts for vim_strnsave()
Problem: Unnecessary type casts for vim_strnsave().
Solution: Remove the type casts.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Jun 2020 23:00:04 +0200 |
parents | 513c62184ed8 |
children | 4dfd00f481fb |
line wrap: on
line diff
--- a/src/menu.c +++ b/src/menu.c @@ -1810,7 +1810,7 @@ menu_text(char_u *str, int *mnemonic, ch { 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);