This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] New common function "startswith"


> 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!

Thank you,
-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]