sim: use ARRAY_SIZE instead of ad-hoc sizeof calculations
This commit is contained in:
parent
b1499fc214
commit
13a590ca65
39 changed files with 141 additions and 62 deletions
|
@ -1,3 +1,7 @@
|
|||
2017-02-13 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* decode.c (lm32bf_init_idesc_table): Use ARRAY_SIZE.
|
||||
|
||||
2016-08-15 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-if.c (find_limit): Change prototype to take a SIM_DESC.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue