From: wessels Date: Thu, 18 Aug 2016 21:41:53 +0000 (+0000) Subject: We don't need to keep d_append and d_buffered around, since they X-Git-Tag: rec-4.0.2~23^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb671e4a320f0868014a66613ba8ede3dba68e3b;p=thirdparty%2Fpdns.git We don't need to keep d_append and d_buffered around, since they are only used in the constructor. --- diff --git a/pdns/dnsrulactions.hh b/pdns/dnsrulactions.hh index 12c0468bba..28575ea510 100644 --- a/pdns/dnsrulactions.hh +++ b/pdns/dnsrulactions.hh @@ -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}; };