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

@@ -1,4 +1,4 @@
/* vi:set ts=8 sts=4 sw=4:
/* vi:set ts=2 sts=2 sw=2:
*
* VIM - Vi IMproved by Bram Moolenaar
*
@@ -6216,8 +6216,9 @@ static int au_new_group(char_u *name)
for (i = 0; i < augroups.ga_len; ++i)
if (AUGROUP_NAME(i) == NULL)
break;
if (i == augroups.ga_len && ga_grow(&augroups, 1) == FAIL)
return AUGROUP_ERROR;
if (i == augroups.ga_len) {
ga_grow(&augroups, 1);
}
AUGROUP_NAME(i) = vim_strsave(name);
if (AUGROUP_NAME(i) == NULL)