From d44c8e9feb0ad75429874c316f5ca62c34de8468 Mon Sep 17 00:00:00 2001 From: Chip Davis Date: Wed, 28 Jul 2021 21:43:41 -0500 Subject: [PATCH] tests: Do not use llabs(3) on an unsigned difference. Signed-off-by: Chip Davis Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- tests/d3d12.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index b10f24be..a43a7f27 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -63,7 +63,9 @@ static bool compare_uint16(uint16_t a, uint16_t b, unsigned int max_diff) static bool compare_uint64(uint64_t a, uint64_t b, unsigned int max_diff) { - return llabs(a - b) <= max_diff; + uint64_t diff = a > b ? a - b : b - a; + + return diff <= max_diff; } static ULONG get_refcount(void *iface)