]> 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 04:57:59 +0000 (15:57 +1100)
lib/dns/dispatch.c

index 0164c4d6ea6994223db9a94972a60d57b827c85c..07885832de616c93d3d9fa76b0f3d76ad010bfae 100644 (file)
@@ -3273,7 +3273,8 @@ dns_dispatch_addresponse2(dns_dispatch_t *disp, isc_sockaddr_t *dest,
        LOCK(&qid->lock);
        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;
@@ -3281,7 +3282,7 @@ dns_dispatch_addresponse2(dns_dispatch_t *disp, isc_sockaddr_t *dest,
                }
                id += qid->qid_increment;
                id &= 0x0000ffff;
-       }
+       } while (i++ < 64);
        UNLOCK(&qid->lock);
 
        if (!ok) {