0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -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

@@ -1050,7 +1050,6 @@ free_all_mem(void)
if (entered_free_all_mem)
return;
entered_free_all_mem = TRUE;
// Don't want to trigger autocommands from here on.
block_autocmds();
@@ -2542,7 +2541,7 @@ static struct key_name_entry
// NOTE: When adding a long name update MAX_KEY_NAME_LEN.
};
#define KEY_NAMES_TABLE_LEN (sizeof(key_names_table) / sizeof(struct key_name_entry))
#define KEY_NAMES_TABLE_LEN ARRAY_LENGTH(key_names_table)
/*
* Return the modifier mask bit (MOD_MASK_*) which corresponds to the given