From patchwork Wed Aug 22 10:11:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Roirand X-Patchwork-Id: 29004 Received: (qmail 59608 invoked by alias); 22 Aug 2018 10:11:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 59504 invoked by uid 89); 22 Aug 2018 10:11:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=Hx-languages-length:970 X-HELO: mail-wr1-f45.google.com Received: from mail-wr1-f45.google.com (HELO mail-wr1-f45.google.com) (209.85.221.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 22 Aug 2018 10:11:25 +0000 Received: by mail-wr1-f45.google.com with SMTP id w11-v6so1144455wrc.5 for ; Wed, 22 Aug 2018 03:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=83HVx+laowlX/4fZk1K71UHZwdQ6ZX1r4MQkYyVPCzc=; b=Z7z6qdMOiuf2iA0I2W8CPqoQwjWiPkzjD1bXPQPq5LfSBNv0g1TIMMJI0BXarV+7xj ASnhYngWeXs47snRuXJsVtlCsLlL7mJWA8Hdj3sLdZ4DOAcVI305l0rcfhJHnKfRQaSU lErLTWOIcFIdVpgCLEGV6hYjqdEIPNdTaDHtVcC0ntgr25Ie8aJyqs/7wVBqObSI2n4+ ut4ISuHx/hWGACqpLFTzZvr60ezVHtvofQl3Fz5a9Uzrog8okyE2vDVdmMbz1BeMCaIx 9cpDbyUaNxhHFGXwnUsZfyjB+EWIU96OkjaHrxx7qh7reAtncxAjG1aWQtd1v/LTw10G jonQ== Return-Path: Received: from adacore.com ([46.18.100.10]) by smtp.gmail.com with ESMTPSA id d12-v6sm1461431wru.36.2018.08.22.03.11.21 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 22 Aug 2018 03:11:23 -0700 (PDT) Received: by adacore.com (sSMTP sendmail emulation); Wed, 22 Aug 2018 12:11:21 +0200 From: Xavier Roirand To: gdb-patches@sourceware.org Cc: brobecker@adacore.com, Xavier Roirand Subject: [RFA 1/5] Darwin: fix bad loop incrementation Date: Wed, 22 Aug 2018 12:11:13 +0200 Message-Id: <1534932677-9496-2-git-send-email-roirand@adacore.com> In-Reply-To: <1534932677-9496-1-git-send-email-roirand@adacore.com> References: <1534932677-9496-1-git-send-email-roirand@adacore.com> X-IsSubscribed: yes 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;