From 7087912dda3145c746f3f100ab24d3cd66fb3ea2 Mon Sep 17 00:00:00 2001 From: Ted Ying Date: Thu, 17 Aug 2017 17:32:25 -0400 Subject: [PATCH 1/2] Initialize max_count in value_history --- src/value-history.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/value-history.cpp b/src/value-history.cpp index ecb08e6..6a6552f 100644 --- a/src/value-history.cpp +++ b/src/value-history.cpp @@ -19,6 +19,7 @@ #include #include +#include #include "value-history.hpp" #include "monitor.hpp" @@ -26,7 +27,7 @@ ValueHistory::ValueHistory(Monitor *mon) - : monitor(mon), max_value(0), waits_remaining(0) + : monitor(mon), max_value(std::numeric_limits::min()), max_count(0), waits_remaining(0) { wait_iterations = monitor->update_interval() / Plugin::update_interval; } -- 2.9.4