Replace alloc() with xmalloc() and remove immediate OOM checks

This commit is contained in:
Felipe Oliveira Carvalho
2014-05-09 03:30:26 -03:00
parent a80d7e86c1
commit 21784aeb00
42 changed files with 413 additions and 640 deletions

View File

@@ -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)