authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2021-04-25 19:12:49+02:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2021-04-25 19:12:49+02:00
logdc29d866490e9d886f838e23cb085a9e28c0143b
tree85bbdb491928181f2fc8841ea2c3dd141fbd2412
parent54db36cd88835ed6b9d9584d9568e9aa72e41480

std: Fix wrong alignOf expression

Mostly harmless but conceptually wrong, luckily it hasn't tripped any safety check.

1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/os/linux/tls.zig+2-2
......@@ -248,7 +248,7 @@ fn initTLS() void {
248248 tls_data = @intToPtr([*]u8, img_base + phdr.p_vaddr)[0..phdr.p_filesz];
249249 tls_data_alloc_size = phdr.p_memsz;
250250 } else {
251 tls_align_factor = @alignOf(*usize);
251 tls_align_factor = @alignOf(usize);
252252 tls_data = &[_]u8{};
253253 tls_data_alloc_size = 0;
254254 }
......@@ -308,7 +308,7 @@ fn initTLS() void {
308308}
309309
310310fn alignPtrCast(comptime T: type, ptr: [*]u8) callconv(.Inline) *T {
311 return @ptrCast(*T, @alignCast(@alignOf(*T), ptr));
311 return @ptrCast(*T, @alignCast(@alignOf(T), ptr));
312312}
313313
314314/// Initializes all the fields of the static TLS area and returns the computed