mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 17:58:19 +08:00
posix: Avoid dead code in clock_nanosleep()
This issue was reported by Coverity Scan for RTEMS: CID 1507760: Control flow issues (DEADCODE) Closes #4690.
This commit is contained in:
@@ -127,11 +127,8 @@ int clock_nanosleep(
|
||||
struct timespec actual_end;
|
||||
struct timespec planned_end;
|
||||
|
||||
if ( clock_id == CLOCK_REALTIME ) {
|
||||
_Timecounter_Nanotime( &actual_end );
|
||||
} else {
|
||||
_Timecounter_Nanouptime( &actual_end );
|
||||
}
|
||||
_Assert( clock_id == CLOCK_MONOTONIC );
|
||||
_Timecounter_Nanouptime( &actual_end );
|
||||
|
||||
_Watchdog_Ticks_to_timespec(
|
||||
executing->Timer.Watchdog.expire,
|
||||
|
||||
Reference in New Issue
Block a user