aboutsummaryrefslogtreecommitdiff
path: root/libiberty/memchr.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2001-03-28 05:02:47 +0000
committerDJ Delorie <dj@redhat.com>2001-03-28 05:02:47 +0000
commit30a1def20d43b665660f606caa2dbe1c0b88b8e3 (patch)
tree5e202c3b88ea21c23cdfb98820f284e8550c952b /libiberty/memchr.c
parent6a9c38860316e3c58ef66b1db34a22fa356eb4a5 (diff)
downloadgdb-30a1def20d43b665660f606caa2dbe1c0b88b8e3.zip
gdb-30a1def20d43b665660f606caa2dbe1c0b88b8e3.tar.gz
gdb-30a1def20d43b665660f606caa2dbe1c0b88b8e3.tar.bz2
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 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;