From 6443f8997fa7bc20900548698b38e38d3beae9c7 Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Mon, 31 Mar 2025 13:19:21 +0200 Subject: [PATCH] Host::GetSeverity(): add braces to if statements No change in functionality, just makes the code a bit nicer. --- lib/icinga/host.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/icinga/host.cpp b/lib/icinga/host.cpp index 36149d3dc..0fe7ec8eb 100644 --- a/lib/icinga/host.cpp +++ b/lib/icinga/host.cpp @@ -180,17 +180,19 @@ int Host::GetSeverity() const } else if (state == HostUp) { severity = 0; } else { - if (IsReachable()) + if (IsReachable()) { severity = 64; - else + } else { severity = 32; + } - if (IsAcknowledged()) + if (IsAcknowledged()) { severity += 512; - else if (IsInDowntime()) + } else if (IsInDowntime()) { severity += 256; - else + } else { severity += 2048; + } } olock.Unlock();