aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.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/normal.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/normal.c')
-rw-r--r--src/nvim/normal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 714607e913..bdd6a2a266 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -3382,7 +3382,7 @@ find_decl (
int retval = OK;
int incll;
- pat = alloc(len + 7);
+ pat = xmalloc(len + 7);
/* Put "\V" before the pattern to avoid that the special meaning of "."
* and "~" causes trouble. */
@@ -4356,7 +4356,7 @@ static void nv_ident(cmdarg_T *cap)
kp = (*curbuf->b_p_kp == NUL ? p_kp : curbuf->b_p_kp);
kp_help = (*kp == NUL || STRCMP(kp, ":he") == 0
|| STRCMP(kp, ":help") == 0);
- buf = alloc((unsigned)(n * 2 + 30 + STRLEN(kp)));
+ buf = xmalloc(n * 2 + 30 + STRLEN(kp));
buf[0] = NUL;
switch (cmdchar) {