Changed a "for" loop into a "do ... while" loop.
authorWayne Davison <wayned@samba.org>
Sun, 4 Jul 2004 08:07:23 +0000 (08:07 +0000)
committerWayne Davison <wayned@samba.org>
Sun, 4 Jul 2004 08:07:23 +0000 (08:07 +0000)
match.c

diff --git a/match.c b/match.c
index 8470de0cff462b1614ae62cf5b75357f53dc454f..8ddbf92b45da11311d078c66d3f3ba8232bb7b09 100644 (file)
--- a/match.c
+++ b/match.c
@@ -188,7 +188,7 @@ static void hash_search(int f,struct sum_struct *s,
 
                sum = (s1 & 0xffff) | (s2 << 16);
                tag_hits++;
-               for (; j < s->count && targets[j].t == t; j++) {
+               do {
                        unsigned int l;
                        size_t i = targets[j].i;
 
@@ -235,7 +235,7 @@ static void hash_search(int f,struct sum_struct *s,
                        s2 = sum >> 16;
                        matches++;
                        break;
-               }
+               } while (++j < s->count && targets[j].t == t);
 
        null_tag:
                /* Trim off the first byte from the checksum */