aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-05-22 12:50:59 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-05-22 13:00:51 -0400
commite2e47803bdfd5fb40e3dbc9cdf798bb27d306c72 (patch)
tree6ff1b06b5d5fd6d3260f3a778c33cfaf03f0c295 /src/nvim/indent.c
parent0aa8b5828cc0674894681841f40c3c05bfd2f07b (diff)
parente303a11ebfc352860cce73184ece692ab4d0f01c (diff)
downloadrneovim-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/indent.c')
-rw-r--r--src/nvim/indent.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index aa02efe5b2..06273e98c2 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -182,7 +182,7 @@ int set_indent(int size, int flags)
// characters and allocate accordingly. We will fill the rest with spaces
// after the if (!curbuf->b_p_et) below.
if (orig_char_len != -1) {
- newline = alloc(orig_char_len + size - ind_done + line_len);
+ newline = xmalloc(orig_char_len + size - ind_done + line_len);
todo = size - ind_done;
// Set total length of indent in characters, which may have been
@@ -203,7 +203,7 @@ int set_indent(int size, int flags)
}
} else {
todo = size;
- newline = alloc(ind_len + line_len);
+ newline = xmalloc(ind_len + line_len);
s = newline;
}
@@ -368,7 +368,7 @@ int copy_indent(int size, char_u *src)
// Allocate memory for the result: the copied indent, new indent
// and the rest of the line.
line_len = (int)STRLEN(ml_get_curline()) + 1;
- line = alloc(ind_len + line_len);
+ line = xmalloc(ind_len + line_len);
p = line;
}
}