]> granicus.if.org Git - icinga2/commitdiff
Remove dead code
authorEdgar Fuß <ef@math.uni-bonn.de>
Thu, 18 Oct 2018 16:09:20 +0000 (18:09 +0200)
committerGitHub <noreply@github.com>
Thu, 18 Oct 2018 16:09:20 +0000 (18:09 +0200)
Remove some dead code in ScheduledDowntime::CreateNextDowntime().

lib/icinga/scheduleddowntime.cpp

index 80d7617ba500e05c2d186db699c7fce39d1b5d9c..4390ca3d29eec0d873ce17bbd3a5975caa58f9b9 100644 (file)
@@ -181,15 +181,8 @@ void ScheduledDowntime::CreateNextDowntime()
 
        std::pair<double, double> segment = FindNextSegment();
 
-       if (segment.first == 0 && segment.second == 0) {
-               tm reference = Utility::LocalTime(Utility::GetTime());
-               reference.tm_mday++;
-               reference.tm_hour = 0;
-               reference.tm_min = 0;
-               reference.tm_sec = 0;
-
+       if (segment.first == 0 && segment.second == 0)
                return;
-       }
 
        String downtimeName = Downtime::AddDowntime(GetCheckable(), GetAuthor(), GetComment(),
                segment.first, segment.second,
@@ -261,4 +254,4 @@ void ScheduledDowntime::ValidateChildOptions(const Lazy<Value>& lvalue, const Va
        } catch (const std::exception&) {
                BOOST_THROW_EXCEPTION(ValidationError(this, { "child_options" }, "Invalid child_options specified"));
        }
-}
\ No newline at end of file
+}