Re: [PATCH v3 2/2] Rename suffixcmp() to has_suffix() and invert its result

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

 



Max Horn wrote:

> Well, unlike suffixcmp, it is transitive, so it could be used for sorting.

It is not antisymmetric.

	prefixcmp("foo", "foobar") < 0
	prefixcmp("foobar", "foo") == 0

I can see how it's possible to care about the sign of the return
value, but it's equally possible to care about the sign from
suffixcmp.  Neither is suitable as a function for passing to qsort.

Hoping that clarifies,
Jonathan
--
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]