mirror of
https://github.com/ziglang/zig.git
synced 2026-02-16 14:28:57 +00:00
std: Fix error in tlcsprng init sequence
The fallback case was actually switched with the success one.
This commit is contained in:
parent
9910bfa6d8
commit
992c02ab95
@ -107,13 +107,9 @@ fn tlsCsprngFill(_: *const std.rand.Random, buffer: []u8) void {
|
||||
break :wof;
|
||||
} else |_| {}
|
||||
|
||||
os.madvise(
|
||||
wipe_mem.ptr,
|
||||
wipe_mem.len,
|
||||
os.MADV_WIPEONFORK,
|
||||
) catch {
|
||||
if (os.madvise(wipe_mem.ptr, wipe_mem.len, os.MADV_WIPEONFORK)) |_| {
|
||||
return initAndFill(buffer);
|
||||
};
|
||||
} else |_| {}
|
||||
}
|
||||
|
||||
if (std.Thread.use_pthreads) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user