Use realloc instead of vim_realloc

This commit is contained in:
Felipe Oliveira Carvalho
2014-03-26 17:31:13 -03:00
committed by Thiago de Arruda
parent 580ababcb5
commit f8432ef127
9 changed files with 11 additions and 14 deletions

View File

@@ -12015,7 +12015,7 @@ static void f_readfile(typval_T *argvars, typval_T *rettv)
/* Change "prev" buffer to be the right size. This way
* the bytes are only copied once, and very long lines are
* allocated only once. */
if ((s = vim_realloc(prev, prevlen + len + 1)) != NULL) {
if ((s = realloc(prev, prevlen + len + 1)) != NULL) {
memmove(s + prevlen, start, len);
s[prevlen + len] = NUL;
prev = NULL; /* the list will own the string */
@@ -12100,7 +12100,7 @@ static void f_readfile(typval_T *argvars, typval_T *rettv)
prevsize = grow50pc > growmin ? grow50pc : growmin;
}
newprev = prev == NULL ? alloc(prevsize)
: vim_realloc(prev, prevsize);
: realloc(prev, prevsize);
if (newprev == NULL) {
do_outofmem_msg((long_u)prevsize);
failed = TRUE;