[libc][time] solve the problem which the os tick can be calculated wrongly because the local variable was not initialized.

This commit is contained in:
chunyexixiaoyu 2022-06-01 13:50:47 +08:00 committed by guo
parent a9dce72915
commit 37d0be3290
1 changed files with 1 additions and 1 deletions

View File

@ -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);