File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ class AuditLog {
207207 AuditLogType m_type = NotSetAuditLogType;
208208 std::string m_relevant = std::string(" " );
209209
210- audit_log::writer::Writer *m_writer = NULL ;
210+ audit_log::writer::Writer *m_writer = nullptr ;
211211 bool m_ctlAuditEngineActive = false ; // rules have at least one action On or RelevantOnly
212212};
213213
Original file line number Diff line number Diff line change @@ -51,13 +51,13 @@ namespace modsecurity {
5151namespace audit_log {
5252
5353
54- AuditLog::AuditLog () { }
54+ AuditLog::AuditLog () = default ;
5555
5656
5757AuditLog::~AuditLog () {
5858 if (m_writer) {
5959 delete m_writer;
60- m_writer = NULL ;
60+ m_writer = nullptr ;
6161 }
6262}
6363
@@ -210,7 +210,7 @@ bool AuditLog::init(std::string *error) {
210210 && !m_ctlAuditEngineActive) {
211211 if (m_writer) {
212212 delete m_writer;
213- m_writer = NULL ;
213+ m_writer = nullptr ;
214214 }
215215 return true ;
216216 }
@@ -228,7 +228,7 @@ bool AuditLog::init(std::string *error) {
228228 tmp_writer = new audit_log::writer::Serial (this );
229229 }
230230
231- if (tmp_writer == NULL ) {
231+ if (tmp_writer == nullptr ) {
232232 error->assign (" Writer memory alloc failed!" );
233233 return false ;
234234 }
@@ -306,7 +306,7 @@ bool AuditLog::saveIfRelevant(Transaction *transaction, int parts) {
306306 }
307307 ms_dbg_a (transaction, 5 , " Saving this request as part " \
308308 " of the audit logs." );
309- if (m_writer == NULL ) {
309+ if (m_writer == nullptr ) {
310310 ms_dbg_a (transaction, 1 , " Internal error, audit log writer is null" );
311311 } else {
312312 std::string error;
You can’t perform that action at this time.
0 commit comments