mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-26 14:18:20 +00:00
_TOD_Validate(): Fix incorrect return code
This patch fixes bug #4403. Directives * rtems_timer_fire_when() * rtems_timer_server_fire_when() * rtems_task_wake_when() are documented to return RTEMS_INVALID_ADDRESS when their time-of-day argument is NULL. But actually they return RTEMS_INVALID_CLOCK. To fix the issue this patch changes _TOD_Validate() to return a status code instead of just true/false. Close #4403
This commit is contained in:
committed by
Sebastian Huber
parent
c2687666b1
commit
3af2dc7802
@@ -255,7 +255,7 @@ int setRealTime(
|
||||
if (!RTC_Is_present())
|
||||
return -1;
|
||||
|
||||
if ( !_TOD_Validate(tod) )
|
||||
if (_TOD_Validate(tod) != RTEMS_SUCCESSFUL)
|
||||
return -1;
|
||||
|
||||
RTC_Table[RTC_Minor].pDeviceFns->deviceSetTime(RTC_Minor, tod);
|
||||
|
||||
Reference in New Issue
Block a user