Skip to content
Snippets Groups Projects
Commit 654ca473 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix atexit_funcs call in exit

parent 7a7b3efe
No related branches found
No related tags found
No related merge requests found
...@@ -116,8 +116,7 @@ pub unsafe extern "C" fn exit(status: c_int) { ...@@ -116,8 +116,7 @@ pub unsafe extern "C" fn exit(status: c_int) {
use core::mem; use core::mem;
for i in (0..ATEXIT_FUNCS.len()).rev() { for i in (0..ATEXIT_FUNCS.len()).rev() {
if ATEXIT_FUNCS[i] != None { if let Some(func) = ATEXIT_FUNCS[i] {
let func = mem::transmute::<usize, extern "C" fn()>(ATEXIT_FUNCS[i].unwrap());
(func)(); (func)();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment