Silence compiler warnings

refs #11823
This commit is contained in:
Michael Friedrich 2016-05-21 14:16:47 +02:00
parent b4843dc81b
commit 3f1a9f150b
1 changed files with 2 additions and 2 deletions

View File

@ -356,7 +356,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
String new_state_str = (service ? Service::StateToString(new_state) : Host::StateToString(Host::CalculateState(new_state))); String new_state_str = (service ? Service::StateToString(new_state) : Host::StateToString(Host::CalculateState(new_state)));
/* Whether a hard state change or a volatile state change except OK -> OK happened. */ /* Whether a hard state change or a volatile state change except OK -> OK happened. */
if (hardChange || is_volatile && !(IsStateOK(old_state) && IsStateOK(new_state))) { if (hardChange || (is_volatile && !(IsStateOK(old_state) && IsStateOK(new_state)))) {
OnStateChange(this, cr, StateTypeHard, origin); OnStateChange(this, cr, StateTypeHard, origin);
Log(LogNotice, "Checkable") Log(LogNotice, "Checkable")
<< "State Change: Checkable " << GetName() << " hard state change from " << old_state_str << " to " << new_state_str << " detected." << (is_volatile ? " Checkable is volatile." : ""); << "State Change: Checkable " << GetName() << " hard state change from " << old_state_str << " to " << new_state_str << " detected." << (is_volatile ? " Checkable is volatile." : "");
@ -367,7 +367,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
} }
if (GetStateType() == StateTypeSoft || hardChange || recovery || if (GetStateType() == StateTypeSoft || hardChange || recovery ||
is_volatile && !(IsStateOK(old_state) && IsStateOK(new_state))) (is_volatile && !(IsStateOK(old_state) && IsStateOK(new_state))))
ExecuteEventHandler(); ExecuteEventHandler();
if (send_downtime_notification) if (send_downtime_notification)