summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.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/ex_cmds.c
parent71de720c2c117137185a6fc233b35aab37f0d4bc (diff)
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/ex_cmds.c')
-rw-r--r--src/ex_cmds.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 7420d6752a..3d967580bc 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -397,7 +397,7 @@ ex_sort(exarg_T *eap)
sortbuf1 = NULL;
sortbuf2 = NULL;
regmatch.regprog = NULL;
- nrs = (sorti_T *)lalloc((long_u)(count * sizeof(sorti_T)), TRUE);
+ nrs = (sorti_T *)alloc(count * sizeof(sorti_T));
if (nrs == NULL)
goto sortend;
@@ -793,8 +793,7 @@ ex_retab(exarg_T *eap)
/* len is actual number of white characters used */
len = num_spaces + num_tabs;
old_len = (long)STRLEN(ptr);
- new_line = lalloc(old_len - col + start_col + len + 1,
- TRUE);
+ new_line = alloc(old_len - col + start_col + len + 1);
if (new_line == NULL)
break;
if (start_col > 0)
@@ -1745,7 +1744,7 @@ make_filter_cmd(
len += (long_u)STRLEN(itmp) + 9; /* " { < " + " } " */
if (otmp != NULL)
len += (long_u)STRLEN(otmp) + (long_u)STRLEN(p_srr) + 2; /* " " */
- buf = lalloc(len, TRUE);
+ buf = alloc(len);
if (buf == NULL)
return NULL;
@@ -2536,7 +2535,7 @@ viminfo_readstring(
if (virp->vir_line[off] == Ctrl_V && vim_isdigit(virp->vir_line[off + 1]))
{
len = atol((char *)virp->vir_line + off + 1);
- retval = lalloc(len, TRUE);
+ retval = alloc(len);
if (retval == NULL)
{
/* Line too long? File messed up? Skip next line. */