Commit 0528ca9a authored by Tomasz Wlostowski's avatar Tomasz Wlostowski Committed by Federico Vaga

lib: fixed arithmetic errors

parent c6af0fc8
......@@ -38,9 +38,9 @@ uint64_t fmctdc_ts_ps(struct fmctdc_time *a)
{
uint64_t ps = 0;
ps += a->seconds * 1000000000000ULL;
ps += a->coarse * 8000;
ps += a->frac * 8000ULL / 4096ULL;
ps += (uint64_t) a->seconds * 1000000000000ULL;
ps += (uint64_t) a->coarse * 8000ULL;
ps += (uint64_t) a->frac * 8000ULL / 4096ULL;
return ps;
}
......
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