mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-15 20:08:12 +00: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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user