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:
parent
c931c87173
commit
cb73b2d69c
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue