tests: avoid undefined signed overflow

This commit is contained in:
Anonymous Maarten
2024-12-28 19:06:59 +01:00
committed by Anonymous Maarten
parent 156b3b4a8c
commit efba42a67b
4 changed files with 52 additions and 48 deletions

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)