summaryrefslogtreecommitdiffstats
path: root/usr.bin/rwho/rwho.c
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2001-10-28 20:26:54 +0000
committerdillon <dillon@FreeBSD.org>2001-10-28 20:26:54 +0000
commita3b99516b8f4b21b7a6b046db9ae23969e1b9fa0 (patch)
treea53f5a76179480ddde0f889ff6ebd3e8be9dc2ff /usr.bin/rwho/rwho.c
parentf6980904501c54598ac52a931d84511f55e00539 (diff)
downloadFreeBSD-src-a3b99516b8f4b21b7a6b046db9ae23969e1b9fa0.zip
FreeBSD-src-a3b99516b8f4b21b7a6b046db9ae23969e1b9fa0.tar.gz
Fix time_t == int assumption, convert protocol int to time_t.
Diffstat (limited to 'usr.bin/rwho/rwho.c')
-rw-r--r--usr.bin/rwho/rwho.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c
index b2c2363..ea9b668 100644
--- a/usr.bin/rwho/rwho.c
+++ b/usr.bin/rwho/rwho.c
@@ -162,10 +162,11 @@ main(argc, argv)
mp = myutmp;
for (i = 0; i < nusers; i++) {
char buf[BUFSIZ], cbuf[80];
+ time_t t = int_to_time(mp->myutmp.out_time);
strftime(cbuf, sizeof(cbuf),
d_first ? "%e %b %R" : "%b %e %R",
- localtime((time_t *)&mp->myutmp.out_time));
+ localtime(&t));
(void)sprintf(buf, "%s:%-.*s", mp->myhost,
sizeof(mp->myutmp.out_line), mp->myutmp.out_line);
printf("%-*.*s %-*s %s",
OpenPOWER on IntegriCloud