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 {
207
207
AuditLogType m_type = NotSetAuditLogType;
208
208
std::string m_relevant = std::string(" " );
209
209
210
- audit_log::writer::Writer *m_writer = NULL ;
210
+ audit_log::writer::Writer *m_writer = nullptr ;
211
211
bool m_ctlAuditEngineActive = false ; // rules have at least one action On or RelevantOnly
212
212
};
213
213
Original file line number Diff line number Diff line change @@ -51,13 +51,13 @@ namespace modsecurity {
51
51
namespace audit_log {
52
52
53
53
54
- AuditLog::AuditLog () { }
54
+ AuditLog::AuditLog () = default ;
55
55
56
56
57
57
AuditLog::~AuditLog () {
58
58
if (m_writer) {
59
59
delete m_writer;
60
- m_writer = NULL ;
60
+ m_writer = nullptr ;
61
61
}
62
62
}
63
63
@@ -210,7 +210,7 @@ bool AuditLog::init(std::string *error) {
210
210
&& !m_ctlAuditEngineActive) {
211
211
if (m_writer) {
212
212
delete m_writer;
213
- m_writer = NULL ;
213
+ m_writer = nullptr ;
214
214
}
215
215
return true ;
216
216
}
@@ -228,7 +228,7 @@ bool AuditLog::init(std::string *error) {
228
228
tmp_writer = new audit_log::writer::Serial (this );
229
229
}
230
230
231
- if (tmp_writer == NULL ) {
231
+ if (tmp_writer == nullptr ) {
232
232
error->assign (" Writer memory alloc failed!" );
233
233
return false ;
234
234
}
@@ -306,7 +306,7 @@ bool AuditLog::saveIfRelevant(Transaction *transaction, int parts) {
306
306
}
307
307
ms_dbg_a (transaction, 5 , " Saving this request as part " \
308
308
" of the audit logs." );
309
- if (m_writer == NULL ) {
309
+ if (m_writer == nullptr ) {
310
310
ms_dbg_a (transaction, 1 , " Internal error, audit log writer is null" );
311
311
} else {
312
312
std::string error;
You can’t perform that action at this time.
0 commit comments