mirror of
https://github.com/vim/vim.git
synced 2025-10-17 07:44:28 -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:
@@ -1627,7 +1627,7 @@ gui_mch_get_color(char_u *name)
|
||||
/*
|
||||
* Try to look up a system colour.
|
||||
*/
|
||||
for (i = 0; i < sizeof(sys_table) / sizeof(sys_table[0]); i++)
|
||||
for (i = 0; i < ARRAY_LENGTH(sys_table); i++)
|
||||
if (STRICMP(name, sys_table[i].name) == 0)
|
||||
return GetSysColor(sys_table[i].color);
|
||||
|
||||
@@ -5077,7 +5077,7 @@ error:
|
||||
/*
|
||||
* Parse the GUI related command-line arguments. Any arguments used are
|
||||
* deleted from argv, and *argc is decremented accordingly. This is called
|
||||
* when vim is started, whether or not the GUI has been started.
|
||||
* when Vim is started, whether or not the GUI has been started.
|
||||
*/
|
||||
void
|
||||
gui_mch_prepare(int *argc, char **argv)
|
||||
|
Reference in New Issue
Block a user