sim: use ARRAY_SIZE instead of ad-hoc sizeof calculations

This commit is contained in:
Mike Frysinger
2017-02-13 00:12:35 -05:00
parent b1499fc214
commit 13a590ca65
39 changed files with 141 additions and 62 deletions

View File

@@ -1658,7 +1658,7 @@ init_dsp (struct bfd *abfd)
{
int i, tmp;
for (i = (sizeof sh_dsp_table / sizeof sh_dsp_table[0]) - 1; i >= 0; i--)
for (i = ARRAY_SIZE (sh_dsp_table) - 1; i >= 0; i--)
{
tmp = sh_jump_table[0xf000 + i];
sh_jump_table[0xf000 + i] = sh_dsp_table[i];