Fix for stats min operator

Fix for bug #3410
This commit is contained in:
gitmopp 2017-06-01 19:30:04 +02:00 committed by GitHub
parent 881116b89e
commit 65ed89c48d
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
{
return m_Min;
if (m_Min == DBL_MAX)
return 0;
else
return m_Min;
}