[icinga-checkins] icinga.org: icinga2/master: Silence compiler warnings

git at icinga.org git at icinga.org
Sat May 21 14:16:58 CEST 2016


Module: icinga2
Branch: master
Commit: 3f1a9f150b8ae211befa292cbea1db6932388c20
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=3f1a9f150b8ae211befa292cbea1db6932388c20

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Sat May 21 14:16:47 2016 +0200

Silence compiler warnings

refs #11823

---

 lib/icinga/checkable-check.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp
index d4cad90..4151e16 100644
--- a/lib/icinga/checkable-check.cpp
+++ b/lib/icinga/checkable-check.cpp
@@ -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)



More information about the icinga-checkins mailing list