From: Mark Kettenis Date: Sat, 27 Sep 2003 17:45:01 +0000 (+0000) Subject: * i386-tdep.c (i386_num_register_names, i386_num_mmx_regs): X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1cb97e178f6fceda44b382f450d555090a897322;p=binutils-gdb.git * i386-tdep.c (i386_num_register_names, i386_num_mmx_regs): Initialize using ARRAY_SIZE. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 469109d4a8b..8409294c779 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-09-27 Mark Kettenis + + * i386-tdep.c (i386_num_register_names, i386_num_mmx_regs): + Initialize using ARRAY_SIZE. + 2003-09-27 Andrew Cagney * arch-utils.c (deprecated_init_frame_pc_default): Rename diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index dd19e2499d0..f4cbc347c8a 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -67,8 +67,7 @@ static char *i386_register_names[] = "mxcsr" }; -static const int i386_num_register_names = - (sizeof (i386_register_names) / sizeof (*i386_register_names)); +static const int i386_num_register_names = ARRAY_SIZE (i386_register_names); /* MMX registers. */ @@ -78,8 +77,7 @@ static char *i386_mmx_names[] = "mm4", "mm5", "mm6", "mm7" }; -static const int i386_num_mmx_regs = - (sizeof (i386_mmx_names) / sizeof (i386_mmx_names[0])); +static const int i386_num_mmx_regs = ARRAY_SIZE (i386_mmx_names); #define MM0_REGNUM NUM_REGS