mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
Replace alloc() with xmalloc() and remove immediate OOM checks
This commit is contained in:
@@ -230,7 +230,7 @@ coladvance2 (
|
||||
if (line[idx] == NUL) {
|
||||
/* Append spaces */
|
||||
int correct = wcol - col;
|
||||
char_u *newline = alloc(idx + correct + 1);
|
||||
char_u *newline = xmalloc(idx + correct + 1);
|
||||
int t;
|
||||
|
||||
for (t = 0; t < idx; ++t)
|
||||
@@ -256,7 +256,7 @@ coladvance2 (
|
||||
if (-correct > csize)
|
||||
return FAIL;
|
||||
|
||||
newline = alloc(linelen + csize);
|
||||
newline = xmalloc(linelen + csize);
|
||||
|
||||
for (t = 0; t < linelen; t++) {
|
||||
if (t != idx)
|
||||
|
Reference in New Issue
Block a user