mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-14 19:20:51 +08:00
* memchr.c (memchr): Adjust condition to avoid infinite loop.
From-SVN: r40899
This commit is contained in:
parent
8e9449099d
commit
27f66c0bcb
@ -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,
|
||||
|
@ -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
Block a user