Re: [PATCH] sort: add --threads option to parallelize internal sort.
From:
Pádraig Brady
Subject:
Re: [PATCH] sort: add --threads option to parallelize internal sort.
Date:
Sat, 13 Mar 2010 00:12:15 +0000
User-agent:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3
On 11/03/10 11:29, Chen Guo wrote:
> How stupid of me:
>> +int
>
>> +memcoll0 (const char *s1, size_t s1len, const char *s2, size_t s2len)
>> +{
>> + int diff;
>> + if (!(s1len > 0 && s1[s1len] == '\0'))
>> + abort ();
>> + if (!(s2len > 0 && s2[s2len] == '\0'))
>> + abort ();
>
> should obviously be s1[s1len - 1] and s2[s2len - 1].
Actually s1[s1len] is right as it is a string length
being passed in. The last NUL in the string is not
included in the count