mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
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:
parent
26caa7136a
commit
d44c8e9feb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user