kernel/x86_64: use C++11 style static assert
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
This commit is contained in:
parent
4b75a1e237
commit
2268a48350
@ -98,7 +98,8 @@ x86_set_tls_context(Thread* thread)
|
||||
static addr_t
|
||||
arch_randomize_stack_pointer(addr_t value)
|
||||
{
|
||||
STATIC_ASSERT(MAX_RANDOM_VALUE >= B_PAGE_SIZE - 1);
|
||||
static_assert(MAX_RANDOM_VALUE >= B_PAGE_SIZE - 1,
|
||||
"randomization range is too big");
|
||||
value -= random_value() & (B_PAGE_SIZE - 1);
|
||||
return value & ~addr_t(0xf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user