From 0765265284c3d2c779e38af74ff710f76a590748 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Wed, 31 Aug 2005 20:48:21 +0000 Subject: [PATCH] * m68k-tdep.c (m68k_register_name): Use ARRAY_SIZE. --- gdb/ChangeLog | 4 ++++ gdb/m68k-tdep.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index de07293fc97..9dceff663e7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2005-08-31 Mark Kettenis + + * m68k-tdep.c (m68k_register_name): Use ARRAY_SIZE. + 2005-08-31 Jim Wilson * i386fbsd-tdep.c (i386fbsd_sc_reg_offset): Make it non-static. diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index ebbe4944c42..6469b7ee7d0 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -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 -- 2.30.2