Commit 62d20718 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

mtime: fix signed integer overflow

(cherry picked from commit 45f7b6b3600f41a54daf53e203a237eb3001896d)
parent 861235e8
...@@ -258,7 +258,7 @@ uint64_t NTPtime64 (void) ...@@ -258,7 +258,7 @@ uint64_t NTPtime64 (void)
* No leap seconds during that period since they were not invented yet. * No leap seconds during that period since they were not invented yet.
*/ */
assert (t < 0x100000000); assert (t < 0x100000000);
t |= ((70LL * 365 + 17) * 24 * 60 * 60 + ts.tv_sec) << 32; t |= ((UINT64_C(70) * 365 + 17) * 24 * 60 * 60 + ts.tv_sec) << 32;
return t; return t;
} }
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