Re: [PATCH v2] Rename suffixcmp() to has_suffix() and inverse its result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Max Horn <max@xxxxxxxxx> writes:

> +1 for the change. I find the resulting code easier to understand, too.
> ...
>
> Taking one step back, shouldn't the commit message rather explain
> the new status, instead of referring so much to the past? If I
> imagine somebody reading this in a year, they might not even know
> suffixcmp (e.g. if they joined the project after this patch was
> merged).
>
> How about something like this:
>
> --- 8< ----
>
> Rename suffixcmp() to has_suffix() and invert its result
>
> Now has_suffix() returns 1 when the suffix is present and 0 otherwise.
>
> The old name followed the pattern anything-cmp(), which suggests
> a general comparison function suitable for e.g. sorting objects.
> But this was not the case for suffixcmp().

Yes, much more concise and to the point.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]