diff options
author | DJ Delorie <dj@redhat.com> | 2001-03-28 05:02:47 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2001-03-28 05:02:47 +0000 |
commit | 30a1def20d43b665660f606caa2dbe1c0b88b8e3 (patch) | |
tree | 5e202c3b88ea21c23cdfb98820f284e8550c952b /libiberty | |
parent | 6a9c38860316e3c58ef66b1db34a22fa356eb4a5 (diff) | |
download | gdb-30a1def20d43b665660f606caa2dbe1c0b88b8e3.zip gdb-30a1def20d43b665660f606caa2dbe1c0b88b8e3.tar.gz gdb-30a1def20d43b665660f606caa2dbe1c0b88b8e3.tar.bz2 |
merge from gcc
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 4 | ||||
-rw-r--r-- | libiberty/memchr.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 5780bcd..588bd6f 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -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, diff --git a/libiberty/memchr.c b/libiberty/memchr.c index cce3003..89aa98f 100644 --- a/libiberty/memchr.c +++ b/libiberty/memchr.c @@ -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; |