]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Clean up DynBlock defaults
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 8 Mar 2024 16:27:53 +0000 (17:27 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 16 May 2024 09:10:29 +0000 (11:10 +0200)
pdns/dnsdistdist/dnsdist.hh

index 561e8f68c1f7807e06dba28d1dc412e02470c05b..12dca5706da89646121a8b0fecdd9ba43e13f305 100644 (file)
@@ -317,15 +317,14 @@ public:
 
 struct DynBlock
 {
-  DynBlock() :
-    action(DNSAction::Action::None), warning(false)
+  DynBlock()
   {
     until.tv_sec = 0;
     until.tv_nsec = 0;
   }
 
   DynBlock(const std::string& reason_, const struct timespec& until_, const DNSName& domain_, DNSAction::Action action_) :
-    reason(reason_), domain(domain_), until(until_), action(action_), warning(false)
+    reason(reason_), domain(domain_), until(until_), action(action_)
   {
   }
 
@@ -367,8 +366,8 @@ struct DynBlock
 
   string reason;
   DNSName domain;
-  struct timespec until;
-  mutable std::atomic<unsigned int> blocks;
+  timespec until{};
+  mutable std::atomic<unsigned int> blocks{0};
   DNSAction::Action action{DNSAction::Action::None};
   bool warning{false};
   bool bpf{false};