summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-29 16:10:03 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-09-30 07:29:57 +0200
commitdde74af944553de87c18fe1f4973e4899193dd3b (patch)
tree5e4ae2ec1d9c3892d5d06b09351080dd34144430
parentabda5595f89e3a02d5c99ca5c44b170f1c49d1e5 (diff)
downloadrtems-dde74af944553de87c18fe1f4973e4899193dd3b.tar.bz2
rtems: Adjust parameter names
Adjust parameter names to match with the declaration. This avoid using a name reserved by the C standard: "time". Close #4035.
-rw-r--r--cpukit/rtems/src/clockgettod.c20
-rw-r--r--cpukit/rtems/src/clockgettodtimeval.c6
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;
}