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: Makefile.inc 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.
 Thomas

Reply via email to