summaryrefslogtreecommitdiff
path: root/src/spellfile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-24 19:39:03 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-24 19:39:03 +0200
commit18a4ba29aeccb9841d5bfdd2eaaffdfae2f15ced (patch)
tree408ad339f6b34876d2fa481ac61568c7739b1160 /src/spellfile.c
parent71de720c2c117137185a6fc233b35aab37f0d4bc (diff)
downloadvim-git-18a4ba29aeccb9841d5bfdd2eaaffdfae2f15ced.tar.gz
patch 8.1.1386: unessesary type casts for lalloc()v8.1.1386
Problem: Unessesary type casts for lalloc(). Solution: Remove type casts. Change lalloc(size, TRUE) to alloc(size).
Diffstat (limited to 'src/spellfile.c')
-rw-r--r--src/spellfile.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/spellfile.c b/src/spellfile.c
index 06cf1bcab..0a16514a4 100644
--- a/src/spellfile.c
+++ b/src/spellfile.c
@@ -892,8 +892,7 @@ read_prefcond_section(FILE *fd, slang_T *lp)
if (cnt <= 0)
return SP_FORMERROR;
- lp->sl_prefprog = (regprog_T **)alloc_clear(
- (unsigned)sizeof(regprog_T *) * cnt);
+ lp->sl_prefprog = (regprog_T **)alloc_clear(sizeof(regprog_T *) * cnt);
if (lp->sl_prefprog == NULL)
return SP_OTHERERROR;
lp->sl_prefixcnt = cnt;
@@ -1580,13 +1579,13 @@ spell_read_tree(
if (len > 0)
{
/* Allocate the byte array. */
- bp = lalloc((long_u)len, TRUE);
+ bp = alloc(len);
if (bp == NULL)
return SP_OTHERERROR;
*bytsp = bp;
/* Allocate the index array. */
- ip = (idx_T *)lalloc_clear((long_u)(len * sizeof(int)), TRUE);
+ ip = (idx_T *)lalloc_clear(len * sizeof(int), TRUE);
if (ip == NULL)
return SP_OTHERERROR;
*idxsp = ip;
@@ -4272,8 +4271,7 @@ getroom(
bl = NULL;
else
/* Allocate a block of memory. It is not freed until much later. */
- bl = (sblock_T *)alloc_clear(
- (unsigned)(sizeof(sblock_T) + SBLOCKSIZE));
+ bl = (sblock_T *)alloc_clear(sizeof(sblock_T) + SBLOCKSIZE);
if (bl == NULL)
{
if (!spin->si_did_emsg)