aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2001-10-28 20:19:14 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2001-10-28 20:19:14 +0000
commit9ef76b94a783ef0078e11b6537dea5268ee480b9 (patch)
treeb74b69be80bb75ab20684f490f53dfa2109fb76a /sbin
parente8627df69dc353e5db872d631d2b73001679f649 (diff)
Notes
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ip6fw/ip6fw.c3
-rw-r--r--sbin/ipfw/ipfw.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sbin/ip6fw/ip6fw.c b/sbin/ip6fw/ip6fw.c
index a054a02876fb..148dcdb15931 100644
--- a/sbin/ip6fw/ip6fw.c
+++ b/sbin/ip6fw/ip6fw.c
@@ -207,8 +207,9 @@ show_ip6fw(struct ip6_fw *chain)
if (chain->timestamp)
{
char timestr[30];
+ time_t t = long_to_time(chain->timestamp);
- strcpy(timestr, ctime((time_t *)&chain->timestamp));
+ strcpy(timestr, ctime(&t));
*strchr(timestr, '\n') = '\0';
printf("%s ", timestr);
}
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c
index b31825117418..97947701c123 100644
--- a/sbin/ipfw/ipfw.c
+++ b/sbin/ipfw/ipfw.c
@@ -202,8 +202,9 @@ show_ipfw(struct ip_fw *chain)
if (do_time) {
if (chain->timestamp) {
char timestr[30];
+ time_t t = long_to_time(chain->timestamp);
- strcpy(timestr, ctime((time_t *)&chain->timestamp));
+ strcpy(timestr, ctime(&t));
*strchr(timestr, '\n') = '\0';
printf("%s ", timestr);
} else {