0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.1.1393: unnecessary type casts

Problem:    Unnecessary type casts.
Solution:   Remove type casts from alloc() and lalloc() calls. (Mike Williams)
This commit is contained in:
Bram Moolenaar
2019-05-25 20:21:28 +02:00
parent 682725c141
commit 51e14387f1
31 changed files with 70 additions and 74 deletions

View File

@@ -5914,8 +5914,7 @@ init_history(void)
{
if (newlen)
{
temp = (histentry_T *)alloc(
(long_u)(newlen * sizeof(histentry_T)));
temp = (histentry_T *)alloc(newlen * sizeof(histentry_T));
if (temp == NULL) /* out of memory! */
{
if (type == 0) /* first one: just keep the old length */
@@ -6655,7 +6654,7 @@ prepare_viminfo_history(int asklen, int writing)
viminfo_history[type] = NULL;
else
viminfo_history[type] = (histentry_T *)lalloc(
(long_u)(len * sizeof(histentry_T)), FALSE);
len * sizeof(histentry_T), FALSE);
if (viminfo_history[type] == NULL)
len = 0;
viminfo_hislen[type] = len;