remove const in set_timeval

This commit is contained in:
Meco Man 2021-05-03 09:17:46 +08:00
parent 1a55702ccb
commit 8fee8d2c8c
1 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ static rt_err_t get_timeval(struct timeval *tv)
* @param tv: struct timeval * @param tv: struct timeval
* @return the operation status, RT_EOK on successful * @return the operation status, RT_EOK on successful
*/ */
static int set_timeval(const struct timeval *tv) static int set_timeval(struct timeval *tv)
{ {
#ifdef RT_USING_RTC #ifdef RT_USING_RTC
static rt_device_t device = RT_NULL; static rt_device_t device = RT_NULL;
@ -450,7 +450,7 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz)
if (tv != RT_NULL if (tv != RT_NULL
&& tv->tv_sec >= 0 && tv->tv_sec >= 0
&& tv->tv_usec >= 0 && tv->tv_usec >= 0
&& set_timeval(tv) == RT_EOK) && set_timeval((struct timeval *)tv) == RT_EOK)
{ {
return 0; return 0;
} }