summaryrefslogtreecommitdiffstats
path: root/usr.bin/w
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-06-28 19:11:42 +0000
committerpeter <peter@FreeBSD.org>2003-06-28 19:11:42 +0000
commit1dfc9d7d371ba24b6295fb32465b18dacef22071 (patch)
tree335b856395450ddc60e94fc632d52d9443b6e7b6 /usr.bin/w
parent9eae058f9f09455915b49121266d9907e9ca0b41 (diff)
downloadFreeBSD-src-1dfc9d7d371ba24b6295fb32465b18dacef22071.zip
FreeBSD-src-1dfc9d7d371ba24b6295fb32465b18dacef22071.tar.gz
utmp.ut_time is not a time_t, do not pass a pointer to it to pr_attime().
Diffstat (limited to 'usr.bin/w')
-rw-r--r--usr.bin/w/w.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index 7d3907b..8bf63d1 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -82,6 +82,7 @@ static const char sccsid[] = "@(#)w.c 8.4 (Berkeley) 4/16/94";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <timeconv.h>
#include <unistd.h>
#include <utmp.h>
#include <vis.h>
@@ -356,6 +357,7 @@ main(int argc, char *argv[])
struct sockaddr *sa = (struct sockaddr *)&ss;
struct sockaddr_in *lsin = (struct sockaddr_in *)&ss;
struct sockaddr_in6 *lsin6 = (struct sockaddr_in6 *)&ss;
+ time_t t;
int isaddr;
host_buf[UT_HOSTSIZE] = '\0';
@@ -408,7 +410,8 @@ main(int argc, char *argv[])
strncmp(ep->utmp.ut_line, "cua", 3) ?
ep->utmp.ut_line : ep->utmp.ut_line + 3,
W_DISPHOSTSIZE, W_DISPHOSTSIZE, *p ? p : "-");
- pr_attime(&ep->utmp.ut_time, &now);
+ t = _time_to_time32(ep->utmp.ut_time);
+ pr_attime(&t, &now);
longidle = pr_idle(ep->idle);
(void)printf("%.*s\n", argwidth - longidle, ep->args);
}
OpenPOWER on IntegriCloud