diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-24 19:39:03 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-24 19:39:03 +0200 |
commit | 18a4ba29aeccb9841d5bfdd2eaaffdfae2f15ced (patch) | |
tree | 408ad339f6b34876d2fa481ac61568c7739b1160 /src/ex_getln.c | |
parent | 71de720c2c117137185a6fc233b35aab37f0d4bc (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_getln.c')
-rw-r--r-- | src/ex_getln.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 00193fee88..530efce579 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4166,7 +4166,7 @@ ExpandOne( len = 0; for (i = 0; i < xp->xp_numfiles; ++i) len += (long_u)STRLEN(xp->xp_files[i]) + 1; - ss = lalloc(len, TRUE); + ss = alloc(len); if (ss != NULL) { *ss = NUL; @@ -5914,8 +5914,8 @@ init_history(void) { if (newlen) { - temp = (histentry_T *)lalloc( - (long_u)(newlen * sizeof(histentry_T)), TRUE); + temp = (histentry_T *)alloc( + (long_u)(newlen * sizeof(histentry_T))); if (temp == NULL) /* out of memory! */ { if (type == 0) /* first one: just keep the old length */ @@ -6688,7 +6688,7 @@ read_viminfo_history(vir_T *virp, int writing) { /* Need to re-allocate to append the separator byte. */ len = STRLEN(val); - p = lalloc(len + 2, TRUE); + p = alloc(len + 2); if (p != NULL) { if (type == HIST_SEARCH) @@ -6774,7 +6774,7 @@ handle_viminfo_history( { /* Need to re-allocate to append the separator byte. */ len = vp[3].bv_len; - p = lalloc(len + 2, TRUE); + p = alloc(len + 2); } else len = 0; /* for picky compilers */ |