aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2001-10-28 20:24:51 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2001-10-28 20:24:51 +0000
commit91d37f1692fd242cfe058aede398ddff112e06e7 (patch)
treec4f468cb1c8f6cb0f697818b23cf578a508341f9 /usr.bin
parent9ef76b94a783ef0078e11b6537dea5268ee480b9 (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rusers/rusers.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/rusers/rusers.c b/usr.bin/rusers/rusers.c
index 2322c98b26ef..a401bfa6e055 100644
--- a/usr.bin/rusers/rusers.c
+++ b/usr.bin/rusers/rusers.c
@@ -115,9 +115,8 @@ rusers_reply(caddr_t replyp, struct sockaddr_in *raddrp)
printf("%-*s ", HOST_WIDTH, host);
for (x = 0; x < up->utmpidlearr_len; x++) {
- strncpy(date,
- &(ctime((time_t *)&(up->utmpidlearr_val[x].ui_utmp.ut_time))[4]),
- sizeof(date) - 1);
+ time_t t = int_to_time(up->utmpidlearr_val[x].ui_utmp.ut_time);
+ strncpy(date, &(ctime(&t)[4]), sizeof(date) - 1);
idle = up->utmpidlearr_val[x].ui_idle;
sprintf(idle_time, " :%02d", idle);