aboutsummaryrefslogtreecommitdiff
path: root/sim/iq2000
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2017-02-13 00:12:35 -0500
committerMike Frysinger <vapier@gentoo.org>2017-02-13 01:26:21 -0500
commit13a590ca65f744c8fa55d6e0748cb12f443493f0 (patch)
tree0aaec23ac3d6682a00d7af03dbef8e790c47b681 /sim/iq2000
parentb1499fc214c2877ba76d7dffd4c41e33f3ec37f6 (diff)
downloadgdb-13a590ca65f744c8fa55d6e0748cb12f443493f0.zip
gdb-13a590ca65f744c8fa55d6e0748cb12f443493f0.tar.gz
gdb-13a590ca65f744c8fa55d6e0748cb12f443493f0.tar.bz2
sim: use ARRAY_SIZE instead of ad-hoc sizeof calculations
Diffstat (limited to 'sim/iq2000')
-rw-r--r--sim/iq2000/ChangeLog4
-rw-r--r--sim/iq2000/decode.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index 5e91cbd..e2290ec 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,3 +1,7 @@
+2017-02-13 Mike Frysinger <vapier@gentoo.org>
+
+ * decode.c (iq2000bf_init_idesc_table): Use ARRAY_SIZE.
+
2016-01-10 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
diff --git a/sim/iq2000/decode.c b/sim/iq2000/decode.c
index 7d6bd2d..d3d4dfa 100644
--- a/sim/iq2000/decode.c
+++ b/sim/iq2000/decode.c
@@ -242,7 +242,7 @@ iq2000bf_init_idesc_table (SIM_CPU *cpu)
init_idesc (cpu, id, t);
/* Now fill in the values for the chosen cpu. */
- for (t = iq2000bf_insn_sem, tend = t + sizeof (iq2000bf_insn_sem) / sizeof (*t);
+ for (t = iq2000bf_insn_sem, tend = t + ARRAY_SIZE (iq2000bf_insn_sem);
t != tend; ++t)
{
init_idesc (cpu, & table[t->index], t);