aboutsummaryrefslogtreecommitdiff
path: root/sim/arm/armsupp.c
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/arm/armsupp.c
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/arm/armsupp.c')
-rw-r--r--sim/arm/armsupp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/arm/armsupp.c b/sim/arm/armsupp.c
index 3ff4bf9..11bb53c 100644
--- a/sim/arm/armsupp.c
+++ b/sim/arm/armsupp.c
@@ -17,6 +17,7 @@
#include "armdefs.h"
#include "armemu.h"
#include "ansidecl.h"
+#include "libiberty.h"
#include <math.h>
/* Definitions for the support routines. */
@@ -373,7 +374,7 @@ ModeToBank (ARMword mode)
DUMMYBANK, DUMMYBANK, DUMMYBANK, SYSTEMBANK
};
- if (mode >= (sizeof (bankofmode) / sizeof (bankofmode[0])))
+ if (mode >= ARRAY_SIZE (bankofmode))
return DUMMYBANK;
return bankofmode[mode];