Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: gdb-patches@sourceware.org
Subject: [commit] Use ARRAY_SIZE in m68k_register_name
Date: Wed, 31 Aug 2005 21:08:00 -0000	[thread overview]
Message-ID: <200508312048.j7VKmOf5026042@elgar.sibelius.xs4all.nl> (raw)

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


                 reply	other threads:[~2005-08-31 20:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200508312048.j7VKmOf5026042@elgar.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox