Module: check_mk
Branch: master
Commit: 7197f9a77e58f888491a1b7d19e64dcd0af35d8a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7197f9a77e58f8…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Tue Apr 3 12:11:01 2018 +0200
Win-agent: clear redundant cast to time_t
---
agents/windows/build_version | 2 +-
agents/windows/sections/SectionPS.cc | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/agents/windows/build_version b/agents/windows/build_version
index b860fd7..beb18d7 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-3216
+3218
diff --git a/agents/windows/sections/SectionPS.cc b/agents/windows/sections/SectionPS.cc
index a4e8ed0..655a4bd 100644
--- a/agents/windows/sections/SectionPS.cc
+++ b/agents/windows/sections/SectionPS.cc
@@ -218,8 +218,7 @@ bool SectionPS::outputWMI(std::ostream &out) {
ss >> std::get_time(&t, L"%Y%m%d%H%M%S");
time_t creation_time = mktime(&t);
auto uptime = static_cast<ULONGLONG>(
- static_cast<time_t>(section_helpers::current_time()) -
- creation_time);
+ section_helpers::current_time() - creation_time);
outputProcess(
out,
std::stoull(result.get<std::string>(L"VirtualSize")),