tests: avoid undefined signed overflow
This commit is contained in:
1 parent
156b3b4a8c
commit
efba42a67b
4 files changed
+52
-48
No files matched your search
+2
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user