Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
20829:3d0d6410aecd | 20830:9064044fd4f6 |
---|---|
1808 p = vim_strchr(str, TAB); | 1808 p = vim_strchr(str, TAB); |
1809 if (p != NULL) | 1809 if (p != NULL) |
1810 { | 1810 { |
1811 if (actext != NULL) | 1811 if (actext != NULL) |
1812 *actext = vim_strsave(p + 1); | 1812 *actext = vim_strsave(p + 1); |
1813 text = vim_strnsave(str, (int)(p - str)); | 1813 text = vim_strnsave(str, p - str); |
1814 } | 1814 } |
1815 else | 1815 else |
1816 text = vim_strsave(str); | 1816 text = vim_strsave(str); |
1817 | 1817 |
1818 // Find mnemonic characters "&a" and reduce "&&" to "&". | 1818 // Find mnemonic characters "&a" and reduce "&&" to "&". |
2714 tp = (menutrans_T *)menutrans_ga.ga_data; | 2714 tp = (menutrans_T *)menutrans_ga.ga_data; |
2715 from = vim_strsave(from); | 2715 from = vim_strsave(from); |
2716 if (from != NULL) | 2716 if (from != NULL) |
2717 { | 2717 { |
2718 from_noamp = menu_text(from, NULL, NULL); | 2718 from_noamp = menu_text(from, NULL, NULL); |
2719 to = vim_strnsave(to, (int)(arg - to)); | 2719 to = vim_strnsave(to, arg - to); |
2720 if (from_noamp != NULL && to != NULL) | 2720 if (from_noamp != NULL && to != NULL) |
2721 { | 2721 { |
2722 menu_translate_tab_and_shift(from); | 2722 menu_translate_tab_and_shift(from); |
2723 menu_translate_tab_and_shift(to); | 2723 menu_translate_tab_and_shift(to); |
2724 menu_unescape_name(from); | 2724 menu_unescape_name(from); |