]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Silence a compiler warning on openbsd and fix windows build
authorEvan Hunt <each@isc.org>
Wed, 8 Aug 2018 03:11:46 +0000 (20:11 -0700)
committerOndřej Surý <ondrej@isc.org>
Wed, 8 Aug 2018 06:49:28 +0000 (02:49 -0400)
lib/dns/rdataset.c

index 448e12aa3b7f24df2d3222a42004776288164e06..c1bbbc2152e76b1651a346b61151cb5428e5d1a8 100644 (file)
@@ -400,6 +400,9 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
        }
 
        if ((shuffle || sort)) {
+               isc_uint32_t seed = 0;
+               unsigned int j;
+
                /*
                 * First we get handles to all of the rdata.
                 */
@@ -416,8 +419,6 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
                }
                INSIST(i == count);
 
-               unsigned int j;
-               isc_uint32_t seed;
                if (ISC_LIKELY(want_random)) {
                        seed = isc_random32();
                        j = 0;