Replace explicit sizeof divisions by ARRAY_SIZE.

This commit is contained in:
Vladimir Serbinenko 2015-01-20 12:45:45 +01:00
parent ba3031f996
commit 59d4036594
6 changed files with 16 additions and 14 deletions

View file

@ -47,7 +47,7 @@ static int
parse_color_name (grub_uint8_t *ret, char *name)
{
grub_uint8_t i;
for (i = 0; i < sizeof (color_list) / sizeof (*color_list); i++)
for (i = 0; i < ARRAY_SIZE(color_list); i++)
if (! grub_strcmp (name, color_list[i]))
{
*ret = i;