tests: avoid undefined signed overflow

This commit is contained in:
Anonymous Maarten authored and Anonymous Maarten committed 2025-01-04 01:06:29 +01:00
1 parent 156b3b4a8c
commit efba42a67b
4 files changed
+52 -48

No files matched your search

+2 -2
View File
@@ -180,8 +180,8 @@ static int TestEndian(bool verbose)
static int TST_allmul(void *a, void *b, int arg, void *result, void *expected)
{
(*(long long *)result) = ((*(long long *)a) * (*(long long *)b));
return (*(long long *)result) == (*(long long *)expected);
(*(unsigned long long *)result) = ((*(unsigned long long *)a) * (*(unsigned long long *)b));
return (*(unsigned long long *)result) == (*(unsigned long long *)expected);
}
static int TST_alldiv(void *a, void *b, int arg, void *result, void *expected)