diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-05-09 03:30:26 -0300 |
---|---|---|
committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-05-19 14:50:23 -0300 |
commit | 21784aeb005e78f04f4c1d398bc486be0a65248e (patch) | |
tree | 5180a6de4bd033571e351d06b04419a3af768198 /src/nvim/misc2.c | |
parent | a80d7e86c1f088c5b68d8e8929cc72a0d9680f76 (diff) | |
download | rneovim-21784aeb005e78f04f4c1d398bc486be0a65248e.tar.gz rneovim-21784aeb005e78f04f4c1d398bc486be0a65248e.tar.bz2 rneovim-21784aeb005e78f04f4c1d398bc486be0a65248e.zip |
Replace alloc() with xmalloc() and remove immediate OOM checks
Diffstat (limited to 'src/nvim/misc2.c')
-rw-r--r-- | src/nvim/misc2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/misc2.c b/src/nvim/misc2.c index 1292bc8eb4..dd502f6912 100644 --- a/src/nvim/misc2.c +++ b/src/nvim/misc2.c @@ -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) |