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/normal.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/normal.c')
-rw-r--r-- | src/nvim/normal.c | 4 |
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) { |