projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a9c388
)
merge from gcc
author
DJ Delorie
<dj@redhat.com>
Wed, 28 Mar 2001 05:02:47 +0000
(
05:02
+0000)
committer
DJ Delorie
<dj@redhat.com>
Wed, 28 Mar 2001 05:02:47 +0000
(
05:02
+0000)
libiberty/ChangeLog
patch
|
blob
|
history
libiberty/memchr.c
patch
|
blob
|
history
diff --git
a/libiberty/ChangeLog
b/libiberty/ChangeLog
index 5780bcdc38355b2f47be372c58fbb57e5577fc0f..588bd6fcb89e3b9e7dcb8b75a90101fdb902a649 100644
(file)
--- 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 cce300394375b0e28ae1ad40b3f034fdbc1a0b47..89aa98f1d94662b9e194ce90177b0e8e9db9a24b 100644
(file)
--- 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;