mirror of
https://review.haiku-os.org/buildtools
synced 2025-02-21 05:07:54 +01:00
[taken from gcc-2.95.3-latest-cvs]
2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * memchr.c (memchr): Adjust condition to avoid infinite loop. git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9597 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e8b05382a1
commit
71a05640d7
@ -50,7 +50,7 @@ memchr (src_void, c, length)
|
||||
{
|
||||
const unsigned char *src = (const unsigned char *)src_void;
|
||||
|
||||
while (--length >= 0)
|
||||
while (length-- > 0)
|
||||
{
|
||||
if (*src == c)
|
||||
return (PTR)src;
|
||||
|
Loading…
x
Reference in New Issue
Block a user