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/m32r/decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sim/m32r/decode.c') diff --git a/sim/m32r/decode.c b/sim/m32r/decode.c index 9f7998e..70494bc 100644 --- a/sim/m32r/decode.c +++ b/sim/m32r/decode.c @@ -202,7 +202,7 @@ m32rbf_init_idesc_table (SIM_CPU *cpu) init_idesc (cpu, id, t); /* Now fill in the values for the chosen cpu. */ - for (t = m32rbf_insn_sem, tend = t + sizeof (m32rbf_insn_sem) / sizeof (*t); + for (t = m32rbf_insn_sem, tend = t + ARRAY_SIZE (m32rbf_insn_sem); t != tend; ++t) { init_idesc (cpu, & table[t->index], t); -- cgit v1.1