From 18a4ba29aeccb9841d5bfdd2eaaffdfae2f15ced Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 24 May 2019 19:39:03 +0200 Subject: patch 8.1.1386: unessesary type casts for lalloc() Problem: Unessesary type casts for lalloc(). Solution: Remove type casts. Change lalloc(size, TRUE) to alloc(size). --- src/ex_getln.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ex_getln.c') 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 */ -- cgit v1.2.3