From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29693 invoked by alias); 31 Mar 2002 05:08:40 -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 29683 invoked from network); 31 Mar 2002 05:08:39 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 31 Mar 2002 05:08:39 -0000 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 16rXa7-0004cD-00; Sun, 31 Mar 2002 00:08:43 -0500 Date: Sat, 30 Mar 2002 21:08:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: Minor off-by-one error in command_line_handler Message-ID: <20020331000843.A17713@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <20020327000106.A24311@molenda.com> <20020329025400.A25885@nevyn.them.org> <3CA4A5E5.7060904@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3CA4A5E5.7060904@cygnus.com> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-03/txt/msg00620.txt.bz2 Does /* We're careful not to read beyond the last BLOCK_SYM. */ look about right to you? On Fri, Mar 29, 2002 at 12:35:33PM -0500, Andrew Cagney wrote: > It at least deserves a comment :-) > > > #define ALL_BLOCK_SYMBOLS(bl, i, sym) \ > > for ((i) = 0, (sym) = BLOCK_SYM ((bl), (i)); \ > > (i) < BLOCK_NSYMS ((bl)); \ > >- ++(i), (sym) = BLOCK_SYM ((bl), (i))) > >+ ++(i), (sym) = ((i) < BLOCK_NSYMS ((bl))) \ > >+ ? BLOCK_SYM ((bl), (i)) \ > >+ : NULL) > > > > Andrew > > -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer