aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/mem/Allocator.zig7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/std/mem/Allocator.zig b/lib/std/mem/Allocator.zig
index 3e8d5461f6..6e56607865 100644
--- a/lib/std/mem/Allocator.zig
+++ b/lib/std/mem/Allocator.zig
@@ -200,12 +200,9 @@ pub fn allocAdvancedWithRetAddr(
n: usize,
return_address: usize,
) Error![]align(alignment orelse @alignOf(T)) T {
- const a = if (alignment) |a| blk: {
- if (a == @alignOf(T)) return allocAdvancedWithRetAddr(self, T, null, n, return_address);
- break :blk a;
- } else @alignOf(T);
+ const a = alignment orelse @alignOf(T);
- // The Zig Allocator interface is not intended to solve allocations beyond
+ // The Zig Allocator interface is not intended to solve alignments beyond
// the minimum OS page size. For these use cases, the caller must use OS
// APIs directly.
comptime assert(a <= mem.page_size);