]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence compiler warning
authorMark Andrews <marka@isc.org>
Thu, 9 Jan 2014 04:57:59 +0000 (15:57 +1100)
committerMark Andrews <marka@isc.org>
Thu, 9 Jan 2014 05:01:47 +0000 (16:01 +1100)
(cherry picked from commit 109f477ed7b0ea20217f0b1d5560f376c6d2cd92)

lib/dns/dispatch.c

index f95a763d97d2b1e5a96916b1d6a58b2caedbcf97..e2bc13d4922e915b9326ba4660f35fc289fa9d9e 100644 (file)
@@ -3112,7 +3112,8 @@ dns_dispatch_addresponse2(dns_dispatch_t *disp, isc_sockaddr_t *dest,
         */
        id = (dns_messageid_t)dispatch_random(DISP_ARC4CTX(disp));
        ok = ISC_FALSE;
-       for (i = 0; i < 64; i++) {
+       i = 0;
+       do {
                bucket = dns_hash(qid, dest, id, localport);
                if (entry_search(qid, dest, id, localport, bucket) == NULL) {
                        ok = ISC_TRUE;
@@ -3120,7 +3121,7 @@ dns_dispatch_addresponse2(dns_dispatch_t *disp, isc_sockaddr_t *dest,
                }
                id += qid->qid_increment;
                id &= 0x0000ffff;
-       }
+       } while (i++ < 64);
 
        if (!ok) {
                UNLOCK(&qid->lock);