]> granicus.if.org Git - pdns/commitdiff
dnsdist: Initialize the done variable in the rings' unit tests
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 30 Mar 2018 11:40:34 +0000 (13:40 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 30 Mar 2018 11:40:34 +0000 (13:40 +0200)
pdns/dnsdistdist/test-dnsdistrings_cc.cc

index 7849b51f574808f085832a30c4b26d0d63663176..c98016c729315d3d13c980f72835d37f77c9cae7 100644 (file)
@@ -198,7 +198,7 @@ BOOST_AUTO_TEST_CASE(test_Rings_Threaded) {
   Rings::Query query({now, requestor, qname, size, qtype, dh});
   Rings::Response response({now, requestor, qname, qtype, latency, size, dh, server});
 
-  std::atomic<bool> done;
+  std::atomic<bool> done(false);
   std::vector<std::thread> writerThreads;
   std::thread readerThread(ringReaderThread, std::ref(rings), std::ref(done), numberOfEntries, qtype);