]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
We don't need to keep d_append and d_buffered around, since they
authorwessels <dwessels@farnsworth.verisignlabs.com>
Thu, 18 Aug 2016 21:41:53 +0000 (21:41 +0000)
committerwessels <dwessels@farnsworth.verisignlabs.com>
Thu, 18 Aug 2016 21:41:53 +0000 (21:41 +0000)
are only used in the constructor.

pdns/dnsrulactions.hh

index 12c0468bba6fadcf28071747e642811be42e5173..28575ea510ee07725c32a0bbd02cf23b3d00dbd4 100644 (file)
@@ -872,17 +872,17 @@ public:
   LogAction() : d_fp(0)
   {
   }
-  LogAction(const std::string& str, bool binary=true, bool append=false, bool buffered=true) : d_fname(str), d_binary(binary), d_append(append), d_buffered(buffered)
+  LogAction(const std::string& str, bool binary=true, bool append=false, bool buffered=true) : d_fname(str), d_binary(binary)
   {
     if(str.empty())
       return;
-    if(d_append)
+    if(append)
       d_fp = fopen(str.c_str(), "a+");
     else
       d_fp = fopen(str.c_str(), "w");
     if(!d_fp)
       throw std::runtime_error("Unable to open file '"+str+"' for logging: "+string(strerror(errno)));
-    if(!d_buffered)
+    if(!buffered)
       setbuf(d_fp, 0);
   }
   ~LogAction()
@@ -918,8 +918,6 @@ private:
   string d_fname;
   FILE* d_fp{0};
   bool d_binary{true};
-  bool d_append{false};
-  bool d_buffered{true};
 };