fs/rpmsgfs: fix bug about using uninit variable "times"
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
6f210655fa
commit
0a111b7c96
|
@ -348,6 +348,7 @@ int host_fchstat(int fd, const struct nuttx_stat_s *buf, int flags)
|
|||
}
|
||||
else
|
||||
{
|
||||
times[0].tv_sec = 0;
|
||||
times[0].tv_nsec = UTIME_OMIT;
|
||||
}
|
||||
|
||||
|
@ -358,6 +359,7 @@ int host_fchstat(int fd, const struct nuttx_stat_s *buf, int flags)
|
|||
}
|
||||
else
|
||||
{
|
||||
times[1].tv_sec = 0;
|
||||
times[1].tv_nsec = UTIME_OMIT;
|
||||
}
|
||||
|
||||
|
@ -634,6 +636,7 @@ int host_chstat(const char *path, const struct nuttx_stat_s *buf, int flags)
|
|||
}
|
||||
else
|
||||
{
|
||||
times[0].tv_sec = 0;
|
||||
times[0].tv_nsec = UTIME_OMIT;
|
||||
}
|
||||
|
||||
|
@ -644,6 +647,7 @@ int host_chstat(const char *path, const struct nuttx_stat_s *buf, int flags)
|
|||
}
|
||||
else
|
||||
{
|
||||
times[1].tv_sec = 0;
|
||||
times[1].tv_nsec = UTIME_OMIT;
|
||||
}
|
||||
|
||||
|
|
|
@ -769,6 +769,7 @@ static int rpmsgfs_chstat_handler(FAR struct rpmsg_endpoint *ept,
|
|||
}
|
||||
else
|
||||
{
|
||||
times[0].tv_sec = 0;
|
||||
times[0].tv_nsec = UTIME_OMIT;
|
||||
}
|
||||
|
||||
|
@ -778,6 +779,7 @@ static int rpmsgfs_chstat_handler(FAR struct rpmsg_endpoint *ept,
|
|||
}
|
||||
else
|
||||
{
|
||||
times[1].tv_sec = 0;
|
||||
times[1].tv_nsec = UTIME_OMIT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue