Commit d44d3335 authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Adam Wujek

wrs: print secs as lli

We are not yet at a full 64-bit clean implementation. Actually,
printing secs as unsigned 32 bits will survive 2038, but pp_printf
with the default XINT implementation doesn't support unsigned. And
XINT is still kept because it's smaller, important issue on our nodes.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 94984976
...@@ -103,8 +103,8 @@ static inline int inside_range(int min, int max, int x) ...@@ -103,8 +103,8 @@ static inline int inside_range(int min, int max, int x)
static char *fmt_time(struct pp_time *t) static char *fmt_time(struct pp_time *t)
{ {
static char buf[64]; static char buf[64];
sprintf(buf, "(correct %i) %9li.%09li", sprintf(buf, "(correct %i) %9lli.%09li",
!is_incorrect(t), (long)t->secs, !is_incorrect(t), (long long)t->secs,
(long)(t->scaled_nsecs >> 16)); (long)(t->scaled_nsecs >> 16));
return buf; return buf;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment