[PATCH vkd3d] tests: Do not use llabs(3) on an unsigned difference.
Chip Davis
cdavis at codeweavers.com
Wed Jul 28 21:43:41 CDT 2021
Signed-off-by: Chip Davis <cdavis at codeweavers.com>
---
tests/d3d12.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/d3d12.c b/tests/d3d12.c
index b10f24b..a43a7f2 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)
--
2.31.1
More information about the wine-devel
mailing list