From: bert hubert Date: Tue, 8 Jan 2019 13:17:40 +0000 (+0100) Subject: Zero out qtype response numbers in our statistics X-Git-Tag: rec-4.2.0-alpha1~52^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fdfa2c5f665a9ccfc25ee63189d464d78b4a266;p=thirdparty%2Fpdns.git Zero out qtype response numbers in our statistics Although you might think otherwise, and I frequently do, atomic counters do not get zero-initialized. With this PR, we do this by hand. This makes valgrind usable again on auth. --- diff --git a/pdns/responsestats.cc b/pdns/responsestats.cc index c98db9ad4e..64ec3abe45 100644 --- a/pdns/responsestats.cc +++ b/pdns/responsestats.cc @@ -19,6 +19,8 @@ ResponseStats::ResponseStats() : d_qtypecounters(new std::atomic::max(),0)); + for(unsigned int n =0 ; n < 65535; ++n) + d_qtypecounters[n] = 0; } ResponseStats g_rs;