mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-01 08:33:24 +00:00
localtime() was being called with an int-pointer due to recent utmp
fixes.
This commit is contained in:
parent
5fb4dbe1a0
commit
2064ef1c81
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85649
@ -473,7 +473,8 @@ ac(fp)
|
|||||||
if (!FirstTime)
|
if (!FirstTime)
|
||||||
FirstTime = usr.ut_time;
|
FirstTime = usr.ut_time;
|
||||||
if (Flags & AC_D) {
|
if (Flags & AC_D) {
|
||||||
ltm = localtime(&usr.ut_time);
|
time_t t = int_to_time(usr.ut_time);
|
||||||
|
ltm = localtime(&t);
|
||||||
if (day >= 0 && day != ltm->tm_yday) {
|
if (day >= 0 && day != ltm->tm_yday) {
|
||||||
day = ltm->tm_yday;
|
day = ltm->tm_yday;
|
||||||
/*
|
/*
|
||||||
@ -524,7 +525,8 @@ ac(fp)
|
|||||||
(void)strcpy(usr.ut_line, "~");
|
(void)strcpy(usr.ut_line, "~");
|
||||||
|
|
||||||
if (Flags & AC_D) {
|
if (Flags & AC_D) {
|
||||||
ltm = localtime(&usr.ut_time);
|
time_t t = int_to_time(usr.ut_time);
|
||||||
|
ltm = localtime(&t);
|
||||||
if (day >= 0 && day != ltm->tm_yday) {
|
if (day >= 0 && day != ltm->tm_yday) {
|
||||||
/*
|
/*
|
||||||
* print yesterday's total
|
* print yesterday's total
|
||||||
|
Loading…
Reference in New Issue
Block a user