Module: check_mk
Branch: master
Commit: a558ef098251894e735de335c1325550b25d8310
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a558ef09825189…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Wed Feb 14 09:20:40 2018 +0100
Windows agent: run clang-format
---
agents/windows/Configuration.cc | 3 +--
agents/windows/WinApi.cc | 2 +-
agents/windows/sections/SectionCheckMK.cc | 1 -
agents/windows/sections/SectionEventlog.cc | 6 +++---
agents/windows/sections/SectionOHM.cc | 8 +++-----
agents/windows/sections/SectionUptime.h | 2 +-
agents/windows/sections/SectionWMI.h | 2 +-
7 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/agents/windows/Configuration.cc b/agents/windows/Configuration.cc
index 4e030df..44472a2 100644
--- a/agents/windows/Configuration.cc
+++ b/agents/windows/Configuration.cc
@@ -133,8 +133,7 @@ void Configuration::readConfigFile(const std::string &filename) {
rtrim(value);
// handle host restriction
- if (variable == "host")
- is_active = checkHostRestriction(value);
+ if (variable == "host") is_active = checkHostRestriction(value);
// skip all other variables for non-relevant hosts
else if (!is_active)
diff --git a/agents/windows/WinApi.cc b/agents/windows/WinApi.cc
index 7683ead..72e9139 100644
--- a/agents/windows/WinApi.cc
+++ b/agents/windows/WinApi.cc
@@ -194,7 +194,7 @@ LONG WinApi::CompareFileTime(const FILETIME *lpFileTime1,
}
WINBOOL WinApi::CopyFile(LPCSTR lpExistingFileName, LPCSTR lpNewFileName,
- WINBOOL bFailIfExists) const {
+ WINBOOL bFailIfExists) const {
return ::CopyFileA(lpExistingFileName, lpNewFileName, bFailIfExists);
}
diff --git a/agents/windows/sections/SectionCheckMK.cc
b/agents/windows/sections/SectionCheckMK.cc
index be0c7c0..7d4bca9 100644
--- a/agents/windows/sections/SectionCheckMK.cc
+++ b/agents/windows/sections/SectionCheckMK.cc
@@ -31,7 +31,6 @@
#include "Logger.h"
#include "stringutil.h"
-
struct script_statistics_t {
int pl_count;
int pl_errors;
diff --git a/agents/windows/sections/SectionEventlog.cc
b/agents/windows/sections/SectionEventlog.cc
index ab6b44f..1ea33ed 100644
--- a/agents/windows/sections/SectionEventlog.cc
+++ b/agents/windows/sections/SectionEventlog.cc
@@ -57,8 +57,8 @@ std::pair<char, int> getEventState(const IEventLogRecord
&event, int level) {
}
}
- const char *level_name(int level_id) {
- switch (level_id) {
+const char *level_name(int level_id) {
+ switch (level_id) {
case -1:
return "off";
case 0:
@@ -69,8 +69,8 @@ std::pair<char, int> getEventState(const IEventLogRecord
&event, int level) {
return "crit";
default:
return "invalid";
- }
}
+}
// The int return value is there just for convenience, actually we are not
// interested in the state int value at this point any more.
diff --git a/agents/windows/sections/SectionOHM.cc
b/agents/windows/sections/SectionOHM.cc
index 703f447..b09a9dd 100644
--- a/agents/windows/sections/SectionOHM.cc
+++ b/agents/windows/sections/SectionOHM.cc
@@ -22,12 +22,12 @@
// to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
// Boston, MA 02110-1301 USA.
+#include "SectionOHM.h"
+#include "Configuration.h"
#include "Environment.h"
#include "Logger.h"
#include "OHMMonitor.h"
#include "SectionWMI.h"
-#include "Configuration.h"
-#include "SectionOHM.h"
SectionOHM::SectionOHM(Configuration &config, Logger *logger,
const WinApiAdaptor &winapi)
@@ -38,9 +38,7 @@ SectionOHM::SectionOHM(Configuration &config, Logger *logger,
withObject(L"Sensor");
}
-void SectionOHM::startIfAsync() {
- _ohm_monitor.startProcess();
-}
+void SectionOHM::startIfAsync() { _ohm_monitor.startProcess(); }
bool SectionOHM::produceOutputInner(std::ostream &out) {
Debug(_logger) << "SectionOHM::produceOutputInner";
diff --git a/agents/windows/sections/SectionUptime.h
b/agents/windows/sections/SectionUptime.h
index f5a2d1c..0d7609d 100644
--- a/agents/windows/sections/SectionUptime.h
+++ b/agents/windows/sections/SectionUptime.h
@@ -29,8 +29,8 @@
#include <memory>
#include <string>
#include <vector>
-#include "wmiHelper.h"
#include "Section.h"
+#include "wmiHelper.h"
class Environment;
diff --git a/agents/windows/sections/SectionWMI.h b/agents/windows/sections/SectionWMI.h
index 825b879..2a5b4da 100644
--- a/agents/windows/sections/SectionWMI.h
+++ b/agents/windows/sections/SectionWMI.h
@@ -28,8 +28,8 @@
#include <memory>
#include <string>
#include <vector>
-#include "wmiHelper.h"
#include "Section.h"
+#include "wmiHelper.h"
class SectionWMI : public Section {
public: