Remove OOM error handling code after ga_grow() calls

This commit is contained in:
Felipe Oliveira Carvalho
2014-04-07 22:28:33 -03:00
committed by Thiago de Arruda
parent 457bb26151
commit f6b0e335e1
23 changed files with 315 additions and 401 deletions

View File

@@ -665,9 +665,7 @@ static void expand_path_option(char_u *curdir, garray_T *gap)
simplify_filename(buf);
}
if (ga_grow(gap, 1) == FAIL)
break;
ga_grow(gap, 1);
p = vim_strsave(buf);
if (p == NULL)
@@ -1231,8 +1229,7 @@ addfile (
return;
/* Make room for another item in the file list. */
if (ga_grow(gap, 1) == FAIL)
return;
ga_grow(gap, 1);
p = alloc((unsigned)(STRLEN(f) + 1 + isdir));