]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/arm/armos.c
sim: use ARRAY_SIZE instead of ad-hoc sizeof calculations
[thirdparty/binutils-gdb.git] / sim / arm / armos.c
index ea3d22979ac8d001ddcab507000fd610bdd0e95b..76c449b73d0f7dd4b69fe32de97056fb354c0efd 100644 (file)
@@ -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];