*: use long long to print time_t
Since we can't assume time_t to be long, int, or even long long, this
consistently uses %lld/long long (or %llu/unsigned long long in a few
cases) to print time_t/susecond_t values. This should fix a bunch of
warnings, on NetBSD in particular.
(Unfortunately, there seems to be no "PRId64" style printing macro for
time_t...)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index e4e6f17..7fffba8 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -663,8 +663,9 @@
timerstring(&result, buf, sizeof(buf));
ospf6_spf_reason_string(o->last_spf_reason, rbuf, sizeof(rbuf));
vty_out(vty, "last executed %s ago, reason %s%s", buf, rbuf, VNL);
- vty_out (vty, " Last SPF duration %ld sec %ld usec%s",
- o->ts_spf_duration.tv_sec, o->ts_spf_duration.tv_usec, VNL);
+ vty_out (vty, " Last SPF duration %lld sec %lld usec%s",
+ (long long)o->ts_spf_duration.tv_sec,
+ (long long)o->ts_spf_duration.tv_usec, VNL);
}
else
vty_out(vty, "has not been run$%s", VNL);