summaryrefslogtreecommitdiff
path: root/libiberty/memchr.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@delorie.com>2001-03-28 05:02:47 +0000
committerDJ Delorie <dj@delorie.com>2001-03-28 05:02:47 +0000
commit03e6e928aab694d02d037fe24abf460be35f8dd9 (patch)
tree79114b437a874e623faf742b5046cf8bdd22ac7a /libiberty/memchr.c
parentce95910c8ba87871689a31ac47d3d3140d00c457 (diff)
downloadgdb-03e6e928aab694d02d037fe24abf460be35f8dd9.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/memchr.c')
-rw-r--r--libiberty/memchr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libiberty/memchr.c b/libiberty/memchr.c
index cce30039437..89aa98f1d94 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;