4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-19 04:43:31 +08:00

[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

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