Commit 5550cbc6 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

lib: fix carry bug in fdelay_add_ps()

parent abce15f8
...@@ -118,7 +118,7 @@ static void fdelay_add_ps(struct fdelay_time *p, uint64_t ps) ...@@ -118,7 +118,7 @@ static void fdelay_add_ps(struct fdelay_time *p, uint64_t ps)
coarse++; coarse++;
} }
p->coarse += coarse; p->coarse += coarse;
if (p->coarse > 125*1000*1000) { if (p->coarse >= 125*1000*1000) {
p->coarse -= 125*1000*1000; p->coarse -= 125*1000*1000;
p->utc++; p->utc++;
} }
......
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