On Wed, Sep 29, 2021, 3:24 PM Chris Johns <chr...@rtems.org> wrote: > Is it worth mentioning in the commit message the reserved nature of time > is the > reason for the change? >
Do you mean the method time()? > > Otherwise OK. > > On 30/9/21 12:10 am, Sebastian Huber wrote: > > Adjust parameter names to match with the declaration. > > > > Close #4035. > > --- > > cpukit/rtems/src/clockgettod.c | 20 ++++++++++---------- > > cpukit/rtems/src/clockgettodtimeval.c | 6 +++--- > > 2 files changed, 13 insertions(+), 13 deletions(-) > > > > diff --git a/cpukit/rtems/src/clockgettod.c > b/cpukit/rtems/src/clockgettod.c > > index 01daa3dc15..fed9057f24 100644 > > --- a/cpukit/rtems/src/clockgettod.c > > +++ b/cpukit/rtems/src/clockgettod.c > > @@ -81,7 +81,7 @@ static uint32_t _Year_day_as_month( > > } > > > > rtems_status_code rtems_clock_get_tod( > > - rtems_time_of_day *time_buffer > > + rtems_time_of_day *time_of_day > > ) > > { > > struct timeval now; > > @@ -91,7 +91,7 @@ rtems_status_code rtems_clock_get_tod( > > uint32_t year_days; > > uint32_t leap_years; > > > > - if ( !time_buffer ) > > + if ( !time_of_day ) > > return RTEMS_INVALID_ADDRESS; > > > > if ( !_TOD_Is_set() ) > > @@ -126,14 +126,14 @@ rtems_status_code rtems_clock_get_tod( > > } > > } > > > > - time_buffer->year = year; > > - time_buffer->month = _Year_day_as_month( year, &year_days ) + 1; > > - time_buffer->day = year_days + 1; > > - time_buffer->hour = day_secs / RTEMS_SECS_PER_HOUR; > > - time_buffer->minute = day_secs % RTEMS_SECS_PER_HOUR; > > - time_buffer->second = time_buffer->minute % RTEMS_SECS_PER_MINUTE; > > - time_buffer->minute = time_buffer->minute / RTEMS_SECS_PER_MINUTE; > > - time_buffer->ticks = now.tv_usec / > > + time_of_day->year = year; > > + time_of_day->month = _Year_day_as_month( year, &year_days ) + 1; > > + time_of_day->day = year_days + 1; > > + time_of_day->hour = day_secs / RTEMS_SECS_PER_HOUR; > > + time_of_day->minute = day_secs % RTEMS_SECS_PER_HOUR; > > + time_of_day->second = time_of_day->minute % RTEMS_SECS_PER_MINUTE; > > + time_of_day->minute = time_of_day->minute / RTEMS_SECS_PER_MINUTE; > > + time_of_day->ticks = now.tv_usec / > > rtems_configuration_get_microseconds_per_tick( ); > > > > return RTEMS_SUCCESSFUL; > > diff --git a/cpukit/rtems/src/clockgettodtimeval.c > b/cpukit/rtems/src/clockgettodtimeval.c > > index bf3847afec..a8d89c60a6 100644 > > --- a/cpukit/rtems/src/clockgettodtimeval.c > > +++ b/cpukit/rtems/src/clockgettodtimeval.c > > @@ -24,16 +24,16 @@ > > #include <rtems/score/todimpl.h> > > > > rtems_status_code rtems_clock_get_tod_timeval( > > - struct timeval *time > > + struct timeval *time_of_day > > ) > > { > > - if ( !time ) > > + if ( !time_of_day ) > > return RTEMS_INVALID_ADDRESS; > > > > if ( !_TOD_Is_set() ) > > return RTEMS_NOT_DEFINED; > > > > - _TOD_Get_timeval( time ); > > + _TOD_Get_timeval( time_of_day ); > > > > return RTEMS_SUCCESSFUL; > > } > > > _______________________________________________ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel > _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel