diff options
author | Mike Frysinger <vapier@gentoo.org> | 2017-02-13 00:12:35 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2017-02-13 01:26:21 -0500 |
commit | 13a590ca65f744c8fa55d6e0748cb12f443493f0 (patch) | |
tree | 0aaec23ac3d6682a00d7af03dbef8e790c47b681 /sim/arm/armos.c | |
parent | b1499fc214c2877ba76d7dffd4c41e33f3ec37f6 (diff) | |
download | gdb-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/armos.c')
-rw-r--r-- | sim/arm/armos.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sim/arm/armos.c b/sim/arm/armos.c index ea3d229..76c449b 100644 --- a/sim/arm/armos.c +++ b/sim/arm/armos.c @@ -23,6 +23,7 @@ #include "config.h" #include "ansidecl.h" +#include "libiberty.h" #include <time.h> #include <errno.h> @@ -260,7 +261,7 @@ SWIopen (ARMul_State * state, ARMword name, ARMword SWIflags) return; /* Now we need to decode the Demon open mode. */ - if (SWIflags >= sizeof (translate_open_mode) / sizeof (translate_open_mode[0])) + if (SWIflags >= ARRAY_SIZE (translate_open_mode)) flags = 0; else flags = translate_open_mode[SWIflags]; |