diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-08-02 19:10:38 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-08-02 19:10:38 +0200 |
commit | 35578168becd1e11973bec413f2078a4bf81ba6b (patch) | |
tree | 1eb46d3b958d66b12f83f6e8c583adc33d95a74f /src/arglist.c | |
parent | 952d9d827e5bfc66a6b1d39956e4e5596b09e2bd (diff) |
patch 8.2.3275: optimizer can use hints about ga_grow() normally succeedingv8.2.3275
Problem: Optimizer can use hints about ga_grow() normally succeeding.
Solution: Use GA_GROW_FAILS() and GA_GROW_OK() in several places. (Dominique
Pellé, issue #8635)
Diffstat (limited to 'src/arglist.c')
-rw-r--r-- | src/arglist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arglist.c b/src/arglist.c index 5370142a7f..244dd06782 100644 --- a/src/arglist.c +++ b/src/arglist.c @@ -148,7 +148,7 @@ alist_set( return; alist_clear(al); - if (ga_grow(&al->al_ga, count) == OK) + if (GA_GROW_OK(&al->al_ga, count)) { for (i = 0; i < count; ++i) { @@ -355,7 +355,7 @@ alist_add_list( int old_argcount = ARGCOUNT; if (check_arglist_locked() != FAIL - && ga_grow(&ALIST(curwin)->al_ga, count) == OK) + && GA_GROW_OK(&ALIST(curwin)->al_ga, count)) { if (after < 0) after = 0; @@ -599,7 +599,7 @@ ex_args(exarg_T *eap) garray_T *gap = &curwin->w_alist->al_ga; // ":argslocal": make a local copy of the global argument list. - if (ga_grow(gap, GARGCOUNT) == OK) + if (GA_GROW_OK(gap, GARGCOUNT)) for (i = 0; i < GARGCOUNT; ++i) if (GARGLIST[i].ae_fname != NULL) { |