uefi: erroneous alignment check in pool_allocator

Fixes #21446

Both UefiPoolAllocator and UefiRawPoolAllocator were
passing the value of `log2_ptr_align` directly to
`mem.alignAllocLen` which expects a alignment value.

Both of these calls to `mem.alignAllocLen` are pointless
and the result of the alignment both always true, and
was thrown away anyway.

I have removed these calls entirely.
This commit is contained in:
Nameless 2024-09-19 18:03:33 -05:00 committed by Andrew Kelley
parent 37cd21eb5f
commit 8d76c02f9a

View File

@ -48,11 +48,9 @@ const UefiPoolAllocator = struct {
ret_addr: usize,
) bool {
_ = ret_addr;
_ = log2_old_ptr_align;
if (new_len > buf.len) return false;
_ = mem.alignAllocLen(buf.len, new_len, log2_old_ptr_align);
return true;
}
@ -121,9 +119,6 @@ fn uefi_resize(
std.debug.assert(log2_old_ptr_align <= 3);
if (new_len > buf.len) return false;
_ = mem.alignAllocLen(buf.len, new_len, 8);
return true;
}