mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 02:50:08 +08:00
sim: use ARRAY_SIZE instead of ad-hoc sizeof calculations
This commit is contained in:
@ -160,7 +160,7 @@ lm32bf_init_idesc_table (SIM_CPU *cpu)
|
||||
init_idesc (cpu, id, t);
|
||||
|
||||
/* Now fill in the values for the chosen cpu. */
|
||||
for (t = lm32bf_insn_sem, tend = t + sizeof (lm32bf_insn_sem) / sizeof (*t);
|
||||
for (t = lm32bf_insn_sem, tend = t + ARRAY_SIZE (lm32bf_insn_sem);
|
||||
t != tend; ++t)
|
||||
{
|
||||
init_idesc (cpu, & table[t->index], t);
|
||||
|
Reference in New Issue
Block a user