tests: Do not use llabs(3) on an unsigned difference.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Chip Davis 2021-07-28 21:43:41 -05:00 committed by Alexandre Julliard
parent 26caa7136a
commit d44c8e9feb

View File

@ -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)