merge from gcc

This commit is contained in:
DJ Delorie 2001-03-28 05:02:47 +00:00
parent 6a9c388603
commit 30a1def20d
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* memchr.c (memchr): Adjust condition to avoid infinite loop.
2001-03-23 Jakub Jelinek <jakub@redhat.com>
* cp-demangle.c (demangle_discriminator): `_0' is discriminator #1,

View file

@ -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;