diff options
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/option.c b/src/option.c index d52117e83b..529f676886 100644 --- a/src/option.c +++ b/src/option.c @@ -2001,14 +2001,13 @@ void set_init_1(void) if (p != NULL && *p != NUL) { /* First time count the NUL, otherwise count the ','. */ len = (int)STRLEN(p) + 3; - if (ga_grow(&ga, len) == OK) { - if (ga.ga_len > 0) - STRCAT(ga.ga_data, ","); - STRCAT(ga.ga_data, p); - add_pathsep(ga.ga_data); - STRCAT(ga.ga_data, "*"); - ga.ga_len += len; - } + ga_grow(&ga, len); + if (ga.ga_len > 0) + STRCAT(ga.ga_data, ","); + STRCAT(ga.ga_data, p); + add_pathsep(ga.ga_data); + STRCAT(ga.ga_data, "*"); + ga.ga_len += len; } if (mustfree) vim_free(p); @@ -7653,8 +7652,7 @@ static void langmap_set_entry(int from, int to) b = i; } - if (ga_grow(&langmap_mapga, 1) != OK) - return; /* out of memory */ + ga_grow(&langmap_mapga, 1); /* insert new entry at position "a" */ entries = (langmap_entry_T *)(langmap_mapga.ga_data) + a; |