Merge pull request #5316 from gitmopp/patch-1

Fix for stats min operator

fixes #3410
This commit is contained in:
Michael Friedrich 2017-06-16 21:02:17 +02:00 committed by GitHub
commit 67bd6d1813
1 changed files with 5 additions and 2 deletions

View File

@ -22,7 +22,7 @@
using namespace icinga;
MinAggregator::MinAggregator(const String& attr)
: m_Min(0), m_MinAttr(attr)
: m_Min(DBL_MAX), m_MinAttr(attr)
{ }
void MinAggregator::Apply(const Table::Ptr& table, const Value& row)
@ -37,5 +37,8 @@ void MinAggregator::Apply(const Table::Ptr& table, const Value& row)
double MinAggregator::GetResult(void) const
{
if (m_Min == DBL_MAX)
return 0;
else
return m_Min;
}