tests: Fix undefined behavior in module tests
Test: wpa_supplicant module tests ../src/utils/utils_module_tests.c:933:7: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
This commit is contained in:
parent
297d69161b
commit
f7b2fe99ea
1 changed files with 2 additions and 2 deletions
|
@ -930,7 +930,7 @@ static int const_time_tests(void)
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
{ 1, 0 },
|
{ 1, 0 },
|
||||||
{ 2, 0 },
|
{ 2, 0 },
|
||||||
{ 1 << (sizeof(unsigned int) * 8 - 1), ~0 },
|
{ 1U << (sizeof(unsigned int) * 8 - 1), ~0 },
|
||||||
{ ~0 - 1, ~0 },
|
{ ~0 - 1, ~0 },
|
||||||
{ ~0, ~0 }
|
{ ~0, ~0 }
|
||||||
};
|
};
|
||||||
|
@ -941,7 +941,7 @@ static int const_time_tests(void)
|
||||||
{ 0, ~0 },
|
{ 0, ~0 },
|
||||||
{ 1, 0 },
|
{ 1, 0 },
|
||||||
{ 2, 0 },
|
{ 2, 0 },
|
||||||
{ 1 << (sizeof(unsigned int) * 8 - 1), 0 },
|
{ 1U << (sizeof(unsigned int) * 8 - 1), 0 },
|
||||||
{ ~0 - 1, 0 },
|
{ ~0 - 1, 0 },
|
||||||
{ ~0, 0 }
|
{ ~0, 0 }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue