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

Joel Brobecker
2015-03-05T18:18:22Z

> 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