From 9548692f008809a33404284c364fcea9f93a9eb1 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 2 Mar 2015 09:58:29 +0100 Subject: [PATCH] Fix uninitialized field in the Checkable class Coverity Bug ID: 1272323 --- lib/icinga/checkable.cpp | 11 +++-------- lib/icinga/checkable.hpp | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/icinga/checkable.cpp b/lib/icinga/checkable.cpp index d54aa8ec5..c023ae42f 100644 --- a/lib/icinga/checkable.cpp +++ b/lib/icinga/checkable.cpp @@ -36,7 +36,9 @@ boost::signals2::signal Chec Checkable::Checkable(void) : m_CheckRunning(false) -{ } +{ + SetSchedulingOffset(Utility::Random()); +} void Checkable::Start(void) { @@ -48,13 +50,6 @@ void Checkable::Start(void) DynamicObject::Start(); } -void Checkable::OnConfigLoaded(void) -{ - DynamicObject::OnConfigLoaded(); - - SetSchedulingOffset(Utility::Random()); -} - void Checkable::OnStateLoaded(void) { AddDowntimesToCache(); diff --git a/lib/icinga/checkable.hpp b/lib/icinga/checkable.hpp index 91b462a99..96a43830c 100644 --- a/lib/icinga/checkable.hpp +++ b/lib/icinga/checkable.hpp @@ -282,7 +282,6 @@ public: protected: virtual void Start(void); - virtual void OnConfigLoaded(void); virtual void OnStateLoaded(void); private: