From ad41c17933e40f277d78b0f9d36b691c00bb8ca5 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 3 Sep 2021 11:09:02 +0200 Subject: score: Change TOD_LATEST_YEAR to 2099 This simplifies the implementation a bit. Declare _TOD_Days_to_date[] in . Make _TOD_Days_per_month[] and _TOD_Days_since_last_leap_year[] static. Update #4338. --- cpukit/rtems/src/clockgettod.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cpukit/rtems/src/clockgettod.c') diff --git a/cpukit/rtems/src/clockgettod.c b/cpukit/rtems/src/clockgettod.c index dea136d477..5058b42375 100644 --- a/cpukit/rtems/src/clockgettod.c +++ b/cpukit/rtems/src/clockgettod.c @@ -32,8 +32,6 @@ #define RTEMS_DAYS_PER_YEAR (365UL) #define RTEMS_YEAR_BASE (1970UL) -extern const uint16_t _TOD_Days_to_date[2][13]; - static bool _Leap_year( uint32_t year ) @@ -64,9 +62,9 @@ static uint32_t _Year_day_as_month( uint32_t month = 0; if ( _Leap_year( year ) ) - days_to_date = _TOD_Days_to_date[1]; - else days_to_date = _TOD_Days_to_date[0]; + else + days_to_date = _TOD_Days_to_date[1]; days_to_date += 2; -- cgit v1.2.3