This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH v2] New common function "startswith"
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: gdb-patches at sourceware dot org, Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- Date: Thu, 5 Mar 2015 10:18:07 -0800
- Subject: Re: [PATCH v2] New common function "startswith"
- Authentication-results: sourceware.org; auth=none
- References: <20150304092720 dot GA26337 at blade dot nx> <1425486409-16480-1-git-send-email-gbenson at redhat dot com>
> 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?
> * 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!