diff options
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 9ed421c8a0..4fec82f46b 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -1758,7 +1758,8 @@ void slang_free(slang_T *lp) } /// Frees a salitem_T -static void free_salitem(salitem_T *smp) { +static void free_salitem(salitem_T *smp) +{ xfree(smp->sm_lead); // Don't free sm_oneof and sm_rules, they point into sm_lead. xfree(smp->sm_to); @@ -1768,7 +1769,8 @@ static void free_salitem(salitem_T *smp) { } /// Frees a fromto_T -static void free_fromto(fromto_T *ftp) { +static void free_fromto(fromto_T *ftp) +{ xfree(ftp->ft_from); xfree(ftp->ft_to); } @@ -3420,7 +3422,6 @@ static void spell_suggest_file(suginfo_T *su, char_u *fname) if (STRICMP(su->su_badword, line) == 0) { // Match! Isolate the good word, until CR or NL. for (len = 0; p[len] >= ' '; ++len) { - ; } p[len] = NUL; @@ -3813,7 +3814,6 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so if (sp->ts_prefixdepth == PFD_PREFIXTREE) { // Skip over the NUL bytes, we use them later. for (n = 0; n < len && byts[arridx + n] == 0; ++n) { - ; } sp->ts_curi += n; @@ -3888,7 +3888,6 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so n = stack[sp->ts_prefixdepth].ts_arridx; len = pbyts[n++]; for (c = 0; c < len && pbyts[n + c] == 0; ++c) { - ; } if (c > 0) { c = valid_word_prefix(c, n, flags, |