mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
xrealloc(): similar to xmalloc()
Replaced all calls to realloc by xrealloc. All `== NULL` tests can be removed and the code within `!= NULL` tests can be unwrapped.
This commit is contained in:

committed by
Thiago de Arruda

parent
7bdd1f1898
commit
0e998066b2
@@ -74,7 +74,7 @@ int ga_grow(garray_T *gap, int n)
|
||||
new_len = gap->ga_itemsize * (gap->ga_len + n);
|
||||
pp = (gap->ga_data == NULL)
|
||||
? alloc((unsigned)new_len)
|
||||
: realloc(gap->ga_data, new_len);
|
||||
: xrealloc(gap->ga_data, new_len);
|
||||
|
||||
if (pp == NULL) {
|
||||
return FAIL;
|
||||
|
Reference in New Issue
Block a user