| author | |
| committer | |
| log | 8d76c02f9a7ca664ee669e1f9c1a70b841eb2774 |
| tree | 5af8c3ec7f09b30bf3334835fdc6055230092942 |
| parent | 37cd21eb5f23d2bb26e36ca3de76f0a71e16230c |
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.1 files changed, 1 insertions(+), 6 deletions(-)
lib/std/os/uefi/pool_allocator.zig+1-6| ... | ... | @@ -48,11 +48,9 @@ const UefiPoolAllocator = struct { |
| 48 | 48 | ret_addr: usize, |
| 49 | 49 | ) bool { |
| 50 | 50 | _ = ret_addr; |
| 51 | _ = log2_old_ptr_align; | |
| 51 | 52 | |
| 52 | 53 | if (new_len > buf.len) return false; |
| 53 | ||
| 54 | _ = mem.alignAllocLen(buf.len, new_len, log2_old_ptr_align); | |
| 55 | ||
| 56 | 54 | return true; |
| 57 | 55 | } |
| 58 | 56 | |
| ... | ... | @@ -121,9 +119,6 @@ fn uefi_resize( |
| 121 | 119 | std.debug.assert(log2_old_ptr_align <= 3); |
| 122 | 120 | |
| 123 | 121 | if (new_len > buf.len) return false; |
| 124 | ||
| 125 | _ = mem.alignAllocLen(buf.len, new_len, 8); | |
| 126 | ||
| 127 | 122 | return true; |
| 128 | 123 | } |
| 129 | 124 |