tools/systemd/time: move continue out of the if/else

will be called anyway

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2020-09-04 14:33:26 +02:00 committed by Dietmar Maurer
parent c931c87173
commit cb73b2d69c
1 changed files with 4 additions and 8 deletions

View File

@ -181,12 +181,11 @@ pub fn compute_next_event(
{
// try next day
t.add_days(n - day_num, true)?;
continue;
} else {
// try next week
t.add_days(7 - day_num, true)?;
continue;
}
continue;
}
}
@ -197,12 +196,11 @@ pub fn compute_next_event(
if let Some(n) = DateTimeValue::find_next(&event.hour, hour) {
// test next hour
t.set_time(n as libc::c_int, 0, 0)?;
continue;
} else {
// test next day
t.add_days(1, true)?;
continue;
}
continue;
}
}
@ -213,12 +211,11 @@ pub fn compute_next_event(
if let Some(n) = DateTimeValue::find_next(&event.minute, minute) {
// test next minute
t.set_min_sec(n as libc::c_int, 0)?;
continue;
} else {
// test next hour
t.set_time(t.hour() + 1, 0, 0)?;
continue;
}
continue;
}
}
@ -229,12 +226,11 @@ pub fn compute_next_event(
if let Some(n) = DateTimeValue::find_next(&event.second, second) {
// test next second
t.set_sec(n as libc::c_int)?;
continue;
} else {
// test next min
t.set_min_sec(t.min() + 1, 0)?;
continue;
}
continue;
}
}