Source-Changes-D archive

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

Re: CVS commit: src/lib/libc/string

In article 
Thomas Klausner  <> wrote:
>On Fri, Apr 10, 2009 at 07:13:38PM -0400, Christos Zoulas wrote:
>> Module Name: src
>> Committed By:        christos
>> Date:                Fri Apr 10 23:13:38 UTC 2009
>> Modified Files:
>>      src/lib/libc/string: memchr.3
>> Added Files:
>>      src/lib/libc/string: memrchr.c
>> Log Message:
>> add memrchr
>const unsigned char *p = s;
>Shouldn't this be
>const unsigned char *p = s+n;
>But perhaps I misunderstand what it should do. I thought it would look
>in the area [s, s+n-1] for c from the right. It seems to me that it
>currently looks in [s-n+1, s] for c from the right.

The implementation that I saw did exactly that, but I looked more and
it appears to be wrong. I will fix it.


Home | Main Index | Thread Index | Old Index