Replace alloc() with xmalloc() and remove immediate OOM checks

This commit is contained in:
Felipe Oliveira Carvalho
2014-05-09 03:30:26 -03:00
parent a80d7e86c1
commit 21784aeb00
42 changed files with 413 additions and 640 deletions

View File

@@ -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) {