From 42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876 Mon Sep 17 00:00:00 2001 From: Felipe Oliveira Carvalho Date: Sat, 19 Apr 2014 02:12:47 -0300 Subject: No OOM error condition in ga_concat_strings(), concat_fnames(), concat_str() - xmallocz() is not static anymore. There are many use cases for this function in the codebase and we should start using it. - Simpler types in ga_concat_strings() --- src/option.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/option.c') diff --git a/src/option.c b/src/option.c index 3f8d037833..a12b3d879a 100644 --- a/src/option.c +++ b/src/option.c @@ -5048,13 +5048,11 @@ static char_u *compile_cap_prog(synblock_T *synblock) else { /* Prepend a ^ so that we only match at one column */ re = concat_str((char_u *)"^", synblock->b_p_spc); - if (re != NULL) { - synblock->b_cap_prog = vim_regcomp(re, RE_MAGIC); - vim_free(re); - if (synblock->b_cap_prog == NULL) { - synblock->b_cap_prog = rp; /* restore the previous program */ - return e_invarg; - } + synblock->b_cap_prog = vim_regcomp(re, RE_MAGIC); + vim_free(re); + if (synblock->b_cap_prog == NULL) { + synblock->b_cap_prog = rp; /* restore the previous program */ + return e_invarg; } } -- cgit