From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82705 invoked by alias); 6 Mar 2015 09:48:26 -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 82685 invoked by uid 89); 6 Mar 2015 09:48:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 06 Mar 2015 09:48:15 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t269m9nf020723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 6 Mar 2015 04:48:09 -0500 Received: from blade.nx (ovpn-116-133.ams2.redhat.com [10.36.116.133]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t269m8aU022032; Fri, 6 Mar 2015 04:48:09 -0500 Received: by blade.nx (Postfix, from userid 1000) id 2755226506C; Fri, 6 Mar 2015 09:48:08 +0000 (GMT) Date: Fri, 06 Mar 2015 09:48:00 -0000 From: Gary Benson To: Joel Brobecker Cc: gdb-patches@sourceware.org, Andreas Arnez Subject: Re: [PATCH v2] New common function "startswith" Message-ID: <20150306094807.GA4866@blade.nx> References: <20150304092720.GA26337@blade.nx> <1425486409-16480-1-git-send-email-gbenson@redhat.com> <20150305181807.GC4604@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150305181807.GC4604@adacore.com> X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00169.txt.bz2 Joel Brobecker wrote: > > This patch introduces a new inline common function "startswith" > > which takes two string arguments and returns nonzero if the first > > string starts with the second. It also updates the 295 places > > where this logic was written out longhand to use the new function. > > > > Changes from the first version are: > > > > - The function is now inline. > > - The arguments got renamed to "string" and "pattern". > > - I found 115 more places to use it. > > > > Regression tested on RHEL 6.6 x86_64. > > > > Ok to commit? > > -- > > gdb/ChangeLog: > > > > * common/common-utils.h (startswith): New inline function. > > All places where this logic was used updated to use the above. > > I didn't read the entire file all that carefully, just the first > few pages of it. If it was a mechanical change, and then tested > as you say, it's good enough for me, I think. > > OK to push! Thanks Joel, I pushed it. Cheers, Gary -- http://gbenson.net/