about summary refs log tree commit diff
path: root/src/libstd/thread_local
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/thread_local')
-rw-r--r--src/libstd/thread_local/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/thread_local/mod.rs b/src/libstd/thread_local/mod.rs
index f7be63212ab..2a9bf452329 100644
--- a/src/libstd/thread_local/mod.rs
+++ b/src/libstd/thread_local/mod.rs
@@ -429,7 +429,7 @@ mod imp {
                     dtor(ptr);
                 }
                 ptr = DTORS.get();
-                DTORS.set(0 as *mut _);
+                DTORS.set(ptr::null_mut());
             }
         }
     }
@@ -463,6 +463,7 @@ mod imp {
 
     use cell::UnsafeCell;
     use mem;
+    use ptr;
     use sys_common::thread_local::StaticKey as OsStaticKey;
 
     #[doc(hidden)]
@@ -526,7 +527,7 @@ mod imp {
         let key = ptr.key;
         key.os.set(1 as *mut u8);
         drop(ptr);
-        key.os.set(0 as *mut u8);
+        key.os.set(ptr::null_mut());
     }
 }