* m68k-tdep.c (m68k_register_name): Use ARRAY_SIZE.
authorMark Kettenis <kettenis@gnu.org>
Wed, 31 Aug 2005 20:48:21 +0000 (20:48 +0000)
committerMark Kettenis <kettenis@gnu.org>
Wed, 31 Aug 2005 20:48:21 +0000 (20:48 +0000)
gdb/ChangeLog
gdb/m68k-tdep.c

index de07293fc97931e9370c6efa246d3283ad3699bd..9dceff663e741f117d48173b8c9041f9c67579a0 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-31  Mark Kettenis  <kettenis@gnu.org>
+
+       * m68k-tdep.c (m68k_register_name): Use ARRAY_SIZE.
+
 2005-08-31  Jim Wilson  <wilson@specifix.com>
 
        * i386fbsd-tdep.c (i386fbsd_sc_reg_offset): Make it non-static.
index ebbe4944c42683a12c318157d79b9d05d6c9052b..6469b7ee7d004e383e546ebca83b805c6a3b4c73 100644 (file)
@@ -122,8 +122,7 @@ m68k_register_name (int regnum)
     "fpcontrol", "fpstatus", "fpiaddr", "fpcode", "fpflags"
   };
 
-  if (regnum < 0 ||
-      regnum >= sizeof (register_names) / sizeof (register_names[0]))
+  if (regnum < 0 || regnum >= ARRAY_SIZE (register_names))
     internal_error (__FILE__, __LINE__,
                    _("m68k_register_name: illegal register number %d"), regnum);
   else