summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/libc/compilers/common/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c
index 16387148f6..96591113b8 100644
--- a/components/libc/compilers/common/time.c
+++ b/components/libc/compilers/common/time.c
@@ -689,7 +689,7 @@ int rt_timespec_to_tick(const struct timespec *time)
{
int tick;
int nsecond, second;
- struct timespec tp;
+ struct timespec tp = {0};
RT_ASSERT(time != RT_NULL);