diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-04-12 19:37:17 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-04-12 19:37:17 +0200 |
commit | a80faa8930ed5a554beeb2727762538873135e83 (patch) | |
tree | e797605e0c781214543fcba103cffede7af611cd /src/spell.c | |
parent | 82de464f763d6e6d89229be03ce7c6d02fd5fb59 (diff) |
patch 8.2.0559: clearing a struct is verbosev8.2.0559
Problem: Clearing a struct is verbose.
Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER().
Diffstat (limited to 'src/spell.c')
-rw-r--r-- | src/spell.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/spell.c b/src/spell.c index 99e030f911..dab6aeaf4f 100644 --- a/src/spell.c +++ b/src/spell.c @@ -183,7 +183,7 @@ spell_check( if (wp->w_s->b_langp.ga_len == 0) return 1; - vim_memset(&mi, 0, sizeof(matchinf_T)); + CLEAR_FIELD(mi); // A number is always OK. Also skip hexadecimal numbers 0xFF99 and // 0X99FF. But always do check spelling to find "3GPP" and "11 @@ -2274,7 +2274,7 @@ theend: static void clear_midword(win_T *wp) { - vim_memset(wp->w_s->b_spell_ismw, 0, 256); + CLEAR_FIELD(wp->w_s->b_spell_ismw); VIM_CLEAR(wp->w_s->b_spell_ismw_mb); } @@ -2520,9 +2520,9 @@ clear_spell_chartab(spelltab_T *sp) { int i; - // Init everything to FALSE. - vim_memset(sp->st_isw, FALSE, sizeof(sp->st_isw)); - vim_memset(sp->st_isu, FALSE, sizeof(sp->st_isu)); + // Init everything to FALSE (zero). + CLEAR_FIELD(sp->st_isw); + CLEAR_FIELD(sp->st_isu); for (i = 0; i < 256; ++i) { sp->st_fold[i] = i; |