mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 9.0.1251: checking returned value of ga_grow() is inconsistent
Problem: Checking returned value of ga_grow() is inconsistent. Solution: Check for FAIL instaed of "not OK". (Yegappan Lakshmanan, closes #11897)
This commit is contained in:
committed by
Bram Moolenaar
parent
8dbab1d8ce
commit
fadc02a2a5
@@ -645,7 +645,7 @@ foldCreate(linenr_T start, linenr_T end)
|
||||
i = (int)(fp - (fold_T *)gap->ga_data);
|
||||
}
|
||||
|
||||
if (ga_grow(gap, 1) != OK)
|
||||
if (ga_grow(gap, 1) == FAIL)
|
||||
return;
|
||||
|
||||
fp = (fold_T *)gap->ga_data + i;
|
||||
@@ -2884,7 +2884,7 @@ foldInsert(garray_T *gap, int i)
|
||||
{
|
||||
fold_T *fp;
|
||||
|
||||
if (ga_grow(gap, 1) != OK)
|
||||
if (ga_grow(gap, 1) == FAIL)
|
||||
return FAIL;
|
||||
fp = (fold_T *)gap->ga_data + i;
|
||||
if (gap->ga_len > 0 && i < gap->ga_len)
|
||||
|
Reference in New Issue
Block a user