From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20091 invoked by alias); 31 Aug 2005 20:48:36 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 20078 invoked by uid 22791); 31 Aug 2005 20:48:31 -0000 Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 31 Aug 2005 20:48:31 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j7VKmOWB008139 for ; Wed, 31 Aug 2005 22:48:24 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j7VKmOAi018157 for ; Wed, 31 Aug 2005 22:48:24 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j7VKmOf5026042; Wed, 31 Aug 2005 22:48:24 +0200 (CEST) Date: Wed, 31 Aug 2005 21:08:00 -0000 Message-Id: <200508312048.j7VKmOf5026042@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: gdb-patches@sourceware.org Subject: [commit] Use ARRAY_SIZE in m68k_register_name X-SW-Source: 2005-08/txt/msg00274.txt.bz2 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 * 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