mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 17:03:23 +00:00
Fix unreachable error in sys_timer_settime
This commit is contained in:
committed by
Chengjun Chen
parent
9109741e8b
commit
8583eea62b
@ -43,12 +43,10 @@ pub fn sys_timer_settime(
|
||||
// Clear previous timer
|
||||
timer.cancel();
|
||||
} else {
|
||||
let timeout = if flags == 0 {
|
||||
let timeout = if (flags & TIMER_ABSTIME) == 0 {
|
||||
Timeout::After(expire_time)
|
||||
} else if flags == TIMER_ABSTIME {
|
||||
Timeout::When(expire_time)
|
||||
} else {
|
||||
unreachable!()
|
||||
Timeout::When(expire_time)
|
||||
};
|
||||
timer.set_timeout(timeout);
|
||||
}
|
||||
|
Reference in New Issue
Block a user