From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112055 invoked by alias); 22 Aug 2018 13:14:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 112041 invoked by uid 89); 22 Aug 2018 13:14:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1138 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Aug 2018 13:14:44 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w7MDEb0j015354 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 22 Aug 2018 09:14:42 -0400 Received: by simark.ca (Postfix, from userid 112) id 99C9C1EABA; Wed, 22 Aug 2018 09:14:37 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 76F491E012; Wed, 22 Aug 2018 09:14:36 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 22 Aug 2018 13:14:00 -0000 From: Simon Marchi To: Xavier Roirand Cc: gdb-patches@sourceware.org, brobecker@adacore.com Subject: Re: [RFA 1/5] Darwin: fix bad loop incrementation In-Reply-To: <1534932677-9496-2-git-send-email-roirand@adacore.com> References: <1534932677-9496-1-git-send-email-roirand@adacore.com> <1534932677-9496-2-git-send-email-roirand@adacore.com> Message-ID: <35461da20fc0562c31e9f8804ef19372@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00526.txt.bz2 On 2018-08-22 06:11, Xavier Roirand wrote: > When reading symbols from the vector of oso files on Mac OS X > Darwin, a previous commit introduce a change in the loop and add > an increment at each loop iteration whereas this incrementation is > not needed since the increment or set of the loop control variable > is already done in the loop. > > gdb/ChangeLog: > > * machoread.c (macho_symfile_read_all_oso): Remove uneeded > incrementation. > > Change-Id: I3a5a6deb4e9d834ee7d4217a62d90c2ffb7241bc > --- > gdb/machoread.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/machoread.c b/gdb/machoread.c > index 0cbd209..3040fe7 100644 > --- a/gdb/machoread.c > +++ b/gdb/machoread.c > @@ -615,7 +615,7 @@ macho_symfile_read_all_oso (std::vector > *oso_vector_ptr, > std::sort (oso_vector_ptr->begin (), oso_vector_ptr->end (), > oso_el_compare_name); > > - for (ix = 0; ix < oso_vector_ptr->size (); ++ix) > + for (ix = 0; ix < oso_vector_ptr->size ();) > { > int pfx_len; I compared this with the original code (before 2cc9b3048b), that LGTM. Simon