mirror of
https://github.com/neovim/neovim.git
synced 2025-09-13 06:48:17 +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
@@ -4496,7 +4496,7 @@ static void nv_ident(cmdarg_T *cap)
|
||||
vim_free(buf);
|
||||
return;
|
||||
}
|
||||
newbuf = (char_u *)realloc(buf, STRLEN(buf) + STRLEN(p) + 1);
|
||||
newbuf = (char_u *)xrealloc(buf, STRLEN(buf) + STRLEN(p) + 1);
|
||||
if (newbuf == NULL) {
|
||||
vim_free(buf);
|
||||
vim_free(p);
|
||||
|
Reference in New Issue
Block a user