mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Change long variables to time_t if they are passed to time() or localtime()
be reference.
This commit is contained in:
parent
a43e3595f7
commit
37fb4a6158
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=35880
@ -300,7 +300,7 @@ md_gct(rt_buf)
|
||||
struct rogue_time *rt_buf;
|
||||
{
|
||||
struct tm *t, *localtime();
|
||||
long seconds;
|
||||
time_t seconds;
|
||||
|
||||
time(&seconds);
|
||||
t = localtime(&seconds);
|
||||
@ -334,11 +334,11 @@ char *fname;
|
||||
struct rogue_time *rt_buf;
|
||||
{
|
||||
struct stat sbuf;
|
||||
long seconds;
|
||||
time_t seconds;
|
||||
struct tm *t;
|
||||
|
||||
stat(fname, &sbuf);
|
||||
seconds = (long) sbuf.st_mtime;
|
||||
seconds = sbuf.st_mtime;
|
||||
t = localtime(&seconds);
|
||||
|
||||
rt_buf->year = t->tm_year;
|
||||
|
Loading…
Reference in New Issue
Block a user