* memchr.c (memchr): Adjust condition to avoid infinite loop.
From-SVN: r40901
This commit is contained in:
parent
cd5289aa8f
commit
3e99ef610a
|
@ -1,3 +1,7 @@
|
|||
2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* memchr.c (memchr): Adjust condition to avoid infinite loop.
|
||||
|
||||
Fri Mar 16 12:46:19 GMT 2001 Bernd Schmidt (bernds@redhat.com)
|
||||
|
||||
* gcc-2.95.3 Released.
|
||||
|
|
|
@ -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…
Reference in New Issue