From 13a590ca65f744c8fa55d6e0748cb12f443493f0 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 13 Feb 2017 00:12:35 -0500 Subject: sim: use ARRAY_SIZE instead of ad-hoc sizeof calculations --- sim/frv/ChangeLog | 4 ++++ sim/frv/decode.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'sim/frv') diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index 1642a26..68bf388 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,7 @@ +2017-02-13 Mike Frysinger + + * decode.c (frvbf_init_idesc_table): Use ARRAY_SIZE. + 2016-01-10 Mike Frysinger * config.in, configure: Regenerate. diff --git a/sim/frv/decode.c b/sim/frv/decode.c index 6ce49a8..69c155e 100644 --- a/sim/frv/decode.c +++ b/sim/frv/decode.c @@ -841,7 +841,7 @@ frvbf_init_idesc_table (SIM_CPU *cpu) init_idesc (cpu, id, t); /* Now fill in the values for the chosen cpu. */ - for (t = frvbf_insn_sem, tend = t + sizeof (frvbf_insn_sem) / sizeof (*t); + for (t = frvbf_insn_sem, tend = t + ARRAY_SIZE (frvbf_insn_sem); t != tend; ++t) { init_idesc (cpu, & table[t->index], t); -- cgit v1.1