]> granicus.if.org Git - icinga2/commitdiff
Silence compiler warnings
authorMichael Friedrich <michael.friedrich@netways.de>
Sat, 21 May 2016 12:16:47 +0000 (14:16 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Sat, 21 May 2016 12:16:47 +0000 (14:16 +0200)
refs #11823

lib/icinga/checkable-check.cpp

index d4cad9052ef9e579b41f129b693171ee3ee88aae..4151e167ed907e1ec08bfc435da700ac62675878 100644 (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)));
 
        /* 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);
                Log(LogNotice, "Checkable")
                    << "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 ||
-           is_volatile && !(IsStateOK(old_state) && IsStateOK(new_state)))
+           (is_volatile && !(IsStateOK(old_state) && IsStateOK(new_state))))
                ExecuteEventHandler();
 
        if (send_downtime_notification)