Module: check_mk
Branch: master
Commit: 4bbcc9217b802267df826566d211e4dd38bf06c5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4bbcc9217b8022…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Aug 2 09:20:26 2017 +0200
Make cppcheck happy again.
Change-Id: If6384a4943ad630bdf0a26ee1a413509aa654643
---
livestatus/src/LogEntry.cc | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/livestatus/src/LogEntry.cc b/livestatus/src/LogEntry.cc
index a4624f1..f6b526a 100644
--- a/livestatus/src/LogEntry.cc
+++ b/livestatus/src/LogEntry.cc
@@ -34,17 +34,16 @@ using mk::starts_with;
using std::string;
using std::unordered_map;
-LogEntry::LogEntry(MonitoringCore *mc, unsigned lineno, const char *line) {
- // TODO(sp) Fix classifyLogMessage() below to always set all fields and
- // remove this set-me-to-zero-to-be-sure-block.
- _state = 0;
- _attempt = 0;
- _host = nullptr;
- _service = nullptr;
- _contact = nullptr;
- _lineno = lineno;
- _complete = line;
-
+// TODO(sp) Fix classifyLogMessage() below to always set all fields and remove
+// this set-me-to-zero-to-be-sure-block.
+LogEntry::LogEntry(MonitoringCore *mc, unsigned lineno, const char *line)
+ : _lineno(lineno)
+ , _complete(line)
+ , _state(0)
+ , _attempt(0)
+ , _host(nullptr)
+ , _service(nullptr)
+ , _contact(nullptr) {
// pointer to options (everything after ':')
size_t pos = _complete.find(':');
if (pos != string::npos) {