diff src/spellsuggest.c @ 27028:c9474ae175f4 v8.2.4043

patch 8.2.4043: using int for second argument of ga_init2() Commit: https://github.com/vim/vim/commit/04935fb17e5f0f66b82cf4546b9752d3d1fa650e Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 8 16:19:22 2022 +0000 patch 8.2.4043: using int for second argument of ga_init2() Problem: Using int for second argument of ga_init2(). Solution: Remove unnessary type cast (int) when using sizeof().
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Jan 2022 17:30:04 +0100
parents 06a137af96f8
children d0096a7f8d96
line wrap: on
line diff
--- a/src/spellsuggest.c
+++ b/src/spellsuggest.c
@@ -774,8 +774,8 @@ spell_find_suggest(
 
     // Set the info in "*su".
     CLEAR_POINTER(su);
-    ga_init2(&su->su_ga, (int)sizeof(suggest_T), 10);
-    ga_init2(&su->su_sga, (int)sizeof(suggest_T), 10);
+    ga_init2(&su->su_ga, sizeof(suggest_T), 10);
+    ga_init2(&su->su_sga, sizeof(suggest_T), 10);
     if (*badptr == NUL)
 	return;
     hash_init(&su->su_banned);
@@ -2943,7 +2943,7 @@ score_combine(suginfo_T *su)
     check_suggestions(su, &su->su_sga);
     (void)cleanup_suggestions(&su->su_sga, su->su_maxscore, su->su_maxcount);
 
-    ga_init2(&ga, (int)sizeof(suginfo_T), 1);
+    ga_init2(&ga, sizeof(suginfo_T), 1);
     if (ga_grow(&ga, su->su_ga.ga_len + su->su_sga.ga_len) == FAIL)
 	return;