diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-03-29 01:05:04 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-03-31 07:31:47 -0300 |
commit | 0e998066b2533de3cf87ece1068839e60e128f1a (patch) | |
tree | 0dc09cd25ef39a59e6f9c1c41493e11bacea8f79 /src/garray.c | |
parent | 7bdd1f1898c6c94326e4642d8f51f74cc14b5f9d (diff) | |
download | rneovim-0e998066b2533de3cf87ece1068839e60e128f1a.tar.gz rneovim-0e998066b2533de3cf87ece1068839e60e128f1a.tar.bz2 rneovim-0e998066b2533de3cf87ece1068839e60e128f1a.zip |
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.
Diffstat (limited to 'src/garray.c')
-rw-r--r-- | src/garray.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/garray.c b/src/garray.c index 8bf2b7477e..264001f934 100644 --- a/src/garray.c +++ b/src/garray.c @@ -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; |