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:
Sebastian Huber
2022-08-05 08:20:58 +02:00
parent c36d608079
commit c3c4525a32
+2 -5
View File
@@ -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,