0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.2922: computing array length is done in various ways

Problem:    Computing array length is done in various ways.
Solution:   Use ARRAY_LENGTH everywhere. (Ken Takata, closes #8305)
This commit is contained in:
K.Takata
2021-06-02 13:28:16 +02:00
committed by Bram Moolenaar
parent b54abeeafb
commit eeec254878
43 changed files with 80 additions and 90 deletions

View File

@@ -4817,14 +4817,14 @@ set_chars_option(win_T *wp, char_u **varp)
{
tab = lcstab;
CLEAR_FIELD(lcs_chars);
entries = sizeof(lcstab) / sizeof(struct charstab);
entries = ARRAY_LENGTH(lcstab);
if (varp == &wp->w_p_lcs && wp->w_p_lcs[0] == NUL)
varp = &p_lcs;
}
else
{
tab = filltab;
entries = sizeof(filltab) / sizeof(struct charstab);
entries = ARRAY_LENGTH(filltab);
}
// first round: check for valid value, second round: assign values