aboutsummaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-04-19 02:12:47 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-24 10:31:31 -0300
commit42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876 (patch)
tree8c056bd42ec55f2103d65af680a54bd55dc71d7f /src/option.c
parent4b6b9117b3e8b9b624c354a703f01f0980c60946 (diff)
downloadrneovim-42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876.tar.gz
rneovim-42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876.tar.bz2
rneovim-42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876.zip
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()
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c12
1 files changed, 5 insertions, 7 deletions
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;
}
}