diff options
author | dillon <dillon@FreeBSD.org> | 2001-10-28 20:19:14 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2001-10-28 20:19:14 +0000 |
commit | 3e277dbdb4c09f45f2b8c460917a89bca86d20e1 (patch) | |
tree | b74b69be80bb75ab20684f490f53dfa2109fb76a | |
parent | cdd5ebd3b2b4da560e1502d2af05a4eded9b8fc9 (diff) | |
download | FreeBSD-src-3e277dbdb4c09f45f2b8c460917a89bca86d20e1.zip FreeBSD-src-3e277dbdb4c09f45f2b8c460917a89bca86d20e1.tar.gz |
Properly convert long to time_t
-rw-r--r-- | sbin/ip6fw/ip6fw.c | 3 | ||||
-rw-r--r-- | sbin/ipfw/ipfw.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sbin/ip6fw/ip6fw.c b/sbin/ip6fw/ip6fw.c index a054a02..148dcdb 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 b318251..9794770 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 { |