0
0
mirror of https://github.com/vim/vim.git synced 2025-11-15 23:14:06 -05: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

@@ -1312,7 +1312,7 @@ ml_recover(int checkext)
}
#ifdef FEAT_CRYPT
for (i = 0; i < (int)(sizeof(id1_codes) / sizeof(int)); ++i)
for (i = 0; i < (int)ARRAY_LENGTH(id1_codes); ++i)
if (id1_codes[i] == b0p->b0_id[1])
b0_cm = i;
if (b0_cm > 0)