mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 08:56:29 +00:00
Remove OOM error handling code after ga_grow() calls
This commit is contained in:

committed by
Thiago de Arruda

parent
457bb26151
commit
f6b0e335e1
@@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user