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

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.

Home | Main Index | Thread Index | Old Index