summaryrefslogtreecommitdiff
path: root/src/fold.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-08 16:19:22 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-08 16:19:22 +0000
commit04935fb17e5f0f66b82cf4546b9752d3d1fa650e (patch)
treed80c59d316f2f17a27a6541a8eb40d01cc49eca8 /src/fold.c
parent143367256836b0f69881dc0c65ff165ae091dbc5 (diff)
downloadvim-git-04935fb17e5f0f66b82cf4546b9752d3d1fa650e.tar.gz
patch 8.2.4043: using int for second argument of ga_init2()v8.2.4043
Problem: Using int for second argument of ga_init2(). Solution: Remove unnessary type cast (int) when using sizeof().
Diffstat (limited to 'src/fold.c')
-rw-r--r--src/fold.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fold.c b/src/fold.c
index 5011887fb..f314d7a34 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -647,7 +647,7 @@ foldCreate(linenr_T start, linenr_T end)
if (ga_grow(gap, 1) == OK)
{
fp = (fold_T *)gap->ga_data + i;
- ga_init2(&fold_ga, (int)sizeof(fold_T), 10);
+ ga_init2(&fold_ga, sizeof(fold_T), 10);
// Count number of folds that will be contained in the new fold.
for (cont = 0; i + cont < gap->ga_len; ++cont)
@@ -1018,7 +1018,7 @@ foldMoveTo(
void
foldInitWin(win_T *new_win)
{
- ga_init2(&new_win->w_folds, (int)sizeof(fold_T), 10);
+ ga_init2(&new_win->w_folds, sizeof(fold_T), 10);
}
// find_wl_entry() {{{2
@@ -2868,7 +2868,7 @@ foldInsert(garray_T *gap, int i)
if (gap->ga_len > 0 && i < gap->ga_len)
mch_memmove(fp + 1, fp, sizeof(fold_T) * (gap->ga_len - i));
++gap->ga_len;
- ga_init2(&fp->fd_nested, (int)sizeof(fold_T), 10);
+ ga_init2(&fp->fd_nested, sizeof(fold_T), 10);
return OK;
}