From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26374 invoked by alias); 2 Jan 2019 18:11:59 -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 26358 invoked by uid 89); 2 Jan 2019 18:11:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=improving, Everything, Marchi, marchi X-HELO: mail-wr1-f68.google.com Received: from mail-wr1-f68.google.com (HELO mail-wr1-f68.google.com) (209.85.221.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 02 Jan 2019 18:11:57 +0000 Received: by mail-wr1-f68.google.com with SMTP id v13so31335827wrw.5 for ; Wed, 02 Jan 2019 10:11:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=undo-io.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UcPz4l6iczAXdwGtnmlYvtjtgW9wETmR6d9OEHuBA70=; b=c4mU6TJuVweNyqOfRNhZ0VaiIyommTzB1NM2mg4oyul8gG6zRdp/AZHuY1TLexu0Yr d+RSPHsmEoqNJ5zPZiF5O5n1jc1HRfJEBKbxN560SgOD0NSKhMbp78hmZrl5F+H8bhbh GGtOV0fs928H6TGYAkHWiLivutcAAtnNxEGE4jZIjiIzjf+8Lf/AcLxCczUDOBnz9xeR sObX3H1lZnQO9NM+8aDy026MalP4QoQspGGdS0FWPYeMPwk5H9EGuCNBZCWTtm9JJCkb +luTvqPXhOfNd6UiDdLZtSKn/uFryilXMq+zAn8sRSp1ugDmo0nIUnYIDNw8n22EpKNR IzGA== Return-Path: Received: from undo-autkin ([109.159.206.110]) by smtp.gmail.com with ESMTPSA id z12sm39214972wrh.35.2019.01.02.10.11.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jan 2019 10:11:54 -0800 (PST) Date: Wed, 02 Jan 2019 18:11:00 -0000 From: Andrey Utkin To: Simon Marchi Cc: John Baldwin , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix search of debug files for remote debuggee Message-ID: <20190102181153.GA32677@undo-autkin> References: <20181109190940.22554-1-autkin@undo.io> <10046787-753c-f7e0-4386-2b50086ae530@FreeBSD.org> <5c1211f6-0e75-d225-158a-0e6a310b68c7@simark.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5c1211f6-0e75-d225-158a-0e6a310b68c7@simark.ca> User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg00039.txt.bz2 On Mon, Dec 24, 2018 at 11:26:05AM -0500, Simon Marchi wrote: > Andrey, I would make a few minor changes to your patch, if you agree: > > - Use "startswith" instead of strncmp > - Use strlen instead of magical number 7 > - Use ternary operator > - Change variable name "remote" to "target_prefix". > > This would be the result: Thanks for improving the patch. Everything looks great now. Please apply.