From 3af2dc7802164d6c22dbef1f144c9bd945a35c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20K=C3=BChndel?= Date: Tue, 11 May 2021 16:26:55 +0200 Subject: _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 --- cpukit/include/rtems/rtems/clockimpl.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cpukit/include/rtems/rtems/clockimpl.h') diff --git a/cpukit/include/rtems/rtems/clockimpl.h b/cpukit/include/rtems/rtems/clockimpl.h index c13c158410..8ec4f0f6e3 100644 --- a/cpukit/include/rtems/rtems/clockimpl.h +++ b/cpukit/include/rtems/rtems/clockimpl.h @@ -37,16 +37,16 @@ extern "C" { /** * @brief TOD Validate * - * This support function returns true if @a the_tod contains - * a valid time of day, and false otherwise. + * This support function tests whether @a the_tod references + * a valid time of day. * - * @param[in] the_tod is the TOD structure to validate + * @param the_tod A reference to the time of day structure to validate. * - * @retval This method returns true if the TOD is valid and false otherwise. - * - * @note This routine only works for leap-years through 2099. + * @retval RTEMS_SUCCESSFUL @a the_tod references a valid time of day. + * @retval RTEMS_INVALID_CLOCK @a the_tod references an invalid time of day. + * @retval RTEMS_INVALID_ADDRESS @a the_tod reference is @c NULL. */ -bool _TOD_Validate( +rtems_status_code _TOD_Validate( const rtems_time_of_day *the_tod ); -- cgit v1.2.3