summaryrefslogtreecommitdiff
path: root/components/libc/compilers/common
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2021-02-07 22:25:30 +0800
committerMeco Man <[email protected]>2021-02-07 22:25:30 +0800
commitd92f8a53da900f4c03dd8c5c0b8163a03a72a9df (patch)
treeba830f296ac15c21e7dede4b9baeb70792588079 /components/libc/compilers/common
parent0d30632de6864a7cfaaa3a1de78ff7ef8f77539a (diff)
update
Diffstat (limited to 'components/libc/compilers/common')
-rw-r--r--components/libc/compilers/common/time.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c
index ad167a85c7..d7f239bea1 100644
--- a/components/libc/compilers/common/time.c
+++ b/components/libc/compilers/common/time.c
@@ -213,13 +213,13 @@ RT_WEAK clock_t clock(void)
/* TODO: timezone */
int gettimeofday(struct timeval *tp, struct timezone *tz)
{
- time_t time = time(NULL);
+ time_t t = time(RT_NULL);
if (tp != RT_NULL)
{
- tp->tv_sec = time;
+ tp->tv_sec = t;
tp->tv_usec = 0;
}
- return time;
+ return 0;
}
time_t timegm(struct tm * const t)