diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-04-02 03:21:21 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-04-02 03:21:21 +0000 |
commit | d83af8a07b070651fb49feafd52644208f298ffd (patch) | |
tree | 087d2ee115cf881e81f768b7ab6e67a1e25587e6 /usr.sbin | |
parent | 69670bbc20ff385e2d1b72d59f6af1444766fdd3 (diff) |
tv_sec is not neccessarily the same type (or size) as time_t
ok guenther
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rtadvd/dump.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/usr.sbin/rtadvd/dump.c b/usr.sbin/rtadvd/dump.c index 5dec0e6f37a..36018c3f3c7 100644 --- a/usr.sbin/rtadvd/dump.c +++ b/usr.sbin/rtadvd/dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dump.c,v 1.11 2012/07/08 10:46:00 phessler Exp $ */ +/* $OpenBSD: dump.c,v 1.12 2013/04/02 03:21:20 deraadt Exp $ */ /* $KAME: dump.c,v 1.27 2002/05/29 14:23:55 itojun Exp $ */ /* @@ -121,17 +121,15 @@ rtadvd_dump() /* control information */ if (rai->lastsent.tv_sec) { + time_t t = rai->lastsent.tv_sec; /* note that ctime() appends CR by itself */ - log_info(" Last RA sent: %s", - ctime((time_t *)&rai->lastsent.tv_sec)); + log_info(" Last RA sent: %s", ctime(&t)); } if (rai->timer) { - log_info(" Next RA will be sent: %s", - ctime((time_t *)&rai->timer->tm.tv_sec)); - - } - else + time_t t = rai->timer->tm.tv_sec; + log_info(" Next RA will be sent: %s", ctime(&t)); + } else log_info(" RA timer is stopped"); log_info(" waits: %d, initcount: %d", |