tests: Fix integer overflows on 32-bit systems
authorAlexandros Frantzis <alexandros.frantzis@collabora.com>
Fri, 1 Dec 2017 17:28:52 +0000 (19:28 +0200)
committerDaniel Stone <daniels@collabora.com>
Mon, 4 Dec 2017 19:06:02 +0000 (19:06 +0000)
commit8c919b488c7dac95e5fe1e81c0be28634e8291d7
treeff1614e4ddc6478a6361ae9b57ebdad04abb1e13
parentbd9069ffadbac80d36a442dd903492501c0c8f63
tests: Fix integer overflows on 32-bit systems

Ensure that the integer type used in expressions involving
multiplication with NSEC_PER_SEC is large enough to avoid overflows on
32-bit systems. In the expressions fixed by this patch a 64-bit type
(long long) is required.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
tests/timespec-test.c