Change long variables to time_t if they are passed to time() or localtime()
be reference.
This commit is contained in:
parent
2228191bb8
commit
6206cfafdc
@ -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