From a3b99516b8f4b21b7a6b046db9ae23969e1b9fa0 Mon Sep 17 00:00:00 2001 From: dillon Date: Sun, 28 Oct 2001 20:26:54 +0000 Subject: Fix time_t == int assumption, convert protocol int to time_t. --- usr.bin/rwho/rwho.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin/rwho/rwho.c') 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", -- cgit v1.1