diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-05-22 12:50:59 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-05-22 13:00:51 -0400 |
commit | e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72 (patch) | |
tree | 6ff1b06b5d5fd6d3260f3a778c33cfaf03f0c295 /src/nvim/misc2.c | |
parent | 0aa8b5828cc0674894681841f40c3c05bfd2f07b (diff) | |
parent | e303a11ebfc352860cce73184ece692ab4d0f01c (diff) | |
download | rneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.tar.gz rneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.tar.bz2 rneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.zip |
Merge #708 'Remove NULL/non-NULL tests after vim_str(n)save'
- replace alloc with xmalloc
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 b9b68c5d0b..d49898815f 100644 --- a/src/nvim/misc2.c +++ b/src/nvim/misc2.c @@ -229,7 +229,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) @@ -255,7 +255,7 @@ coladvance2 ( if (-correct > csize) return FAIL; - newline = alloc(linelen + csize); + newline = xmalloc(linelen + csize); for (t = 0; t < linelen; t++) { if (t != idx) |