Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [commit] Use ARRAY_SIZE in m68k_register_name
@ 2005-08-31 21:08 Mark Kettenis
  0 siblings, 0 replies; only message in thread
From: Mark Kettenis @ 2005-08-31 21:08 UTC (permalink / raw)
  To: gdb-patches

The ARI complaind about the || operator at eol.  Rather than moving it
to the next line I just converted the code to use ARRAY_SIZE ;-).

Committed as obvious,

Mark

Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* m68k-tdep.c (m68k_register_name): Use ARRAY_SIZE.

Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.103
diff -u -p -r1.103 m68k-tdep.c
--- m68k-tdep.c 17 Aug 2005 18:34:17 -0000 1.103
+++ m68k-tdep.c 31 Aug 2005 20:46:23 -0000
@@ -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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-31 20:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-31 21:08 [commit] Use ARRAY_SIZE in m68k_register_name Mark Kettenis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox