summaryrefslogtreecommitdiffstats
path: root/bsps/shared/dev
diff options
context:
space:
mode:
authorFrank Kühndel <frank.kuehndel@embedded-brains.de>2021-05-11 16:26:55 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-05-12 06:41:10 +0200
commit3af2dc7802164d6c22dbef1f144c9bd945a35c30 (patch)
tree6c34fd16da24213f89fde232dd6a0f7ccf87cf35 /bsps/shared/dev
parentrtems: Use _Objects_Free_nothing() for msg queues (diff)
downloadrtems-3af2dc7802164d6c22dbef1f144c9bd945a35c30.tar.bz2
_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
Diffstat (limited to 'bsps/shared/dev')
-rw-r--r--bsps/shared/dev/rtc/rtc-support.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bsps/shared/dev/rtc/rtc-support.c b/bsps/shared/dev/rtc/rtc-support.c
index 765bfe1d6b..04b8f0c847 100644
--- a/bsps/shared/dev/rtc/rtc-support.c
+++ b/bsps/shared/dev/rtc/rtc-support.c
@@ -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);