mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 13:58:27 +00:00
std: Fix wrong alignOf expression
Mostly harmless but conceptually wrong, luckily it hasn't tripped any safety check.
This commit is contained in:
parent
54db36cd88
commit
dc29d86649
@ -248,7 +248,7 @@ fn initTLS() void {
|
||||
tls_data = @intToPtr([*]u8, img_base + phdr.p_vaddr)[0..phdr.p_filesz];
|
||||
tls_data_alloc_size = phdr.p_memsz;
|
||||
} else {
|
||||
tls_align_factor = @alignOf(*usize);
|
||||
tls_align_factor = @alignOf(usize);
|
||||
tls_data = &[_]u8{};
|
||||
tls_data_alloc_size = 0;
|
||||
}
|
||||
@ -308,7 +308,7 @@ fn initTLS() void {
|
||||
}
|
||||
|
||||
fn alignPtrCast(comptime T: type, ptr: [*]u8) callconv(.Inline) *T {
|
||||
return @ptrCast(*T, @alignCast(@alignOf(*T), ptr));
|
||||
return @ptrCast(*T, @alignCast(@alignOf(T), ptr));
|
||||
}
|
||||
|
||||
/// Initializes all the fields of the static TLS area and returns the computed
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user