From 45a34953256b237171a2ceea310b370b309cd29b Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 14 May 2021 08:09:34 +0200 Subject: rtems: Add TOD_Ticks_validation Replace defines with an enum. Update #4406. --- cpukit/rtems/src/clocktodvalidate.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cpukit/rtems/src') diff --git a/cpukit/rtems/src/clocktodvalidate.c b/cpukit/rtems/src/clocktodvalidate.c index 41a1167287..14b3f79d8e 100644 --- a/cpukit/rtems/src/clocktodvalidate.c +++ b/cpukit/rtems/src/clocktodvalidate.c @@ -37,17 +37,19 @@ const uint32_t _TOD_Days_per_month[ 2 ][ 13 ] = { rtems_status_code _TOD_Validate( const rtems_time_of_day *the_tod, - uint32_t ticks_mask + TOD_Ticks_validation ticks_validation ) { - uint32_t days_in_month; - uint32_t ticks_per_second; + uint32_t days_in_month; + uint32_t ticks_per_second; + uint32_t ticks_mask; if ( the_tod == NULL ) { return RTEMS_INVALID_ADDRESS; } ticks_per_second = rtems_clock_get_ticks_per_second(); + ticks_mask = (uint32_t) ticks_validation; if ( ( ( the_tod->ticks & ticks_mask ) >= ticks_per_second ) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || -- cgit v1.2.3