diff options
| author | we <vadim.petrochenkov@gmail.com> | 2015-01-19 08:27:09 +0300 |
|---|---|---|
| committer | we <vadim.petrochenkov@gmail.com> | 2015-01-19 08:27:09 +0300 |
| commit | 2c2480df5d340f4c7b2deeef0177e4fd22f2b03a (patch) | |
| tree | 0661dc5e07b8142ad1ca02ff4be9320ceaa6b3ba /src/libstd/sys/windows/thread_local.rs | |
| parent | 378fb5846d2d8dbc5ab24a5e92794c5c39d492dc (diff) | |
| download | rust-2c2480df5d340f4c7b2deeef0177e4fd22f2b03a.tar.gz rust-2c2480df5d340f4c7b2deeef0177e4fd22f2b03a.zip | |
Replace `0 as *const/mut T` with `ptr::null/null_mut()`
Diffstat (limited to 'src/libstd/sys/windows/thread_local.rs')
| -rw-r--r-- | src/libstd/sys/windows/thread_local.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local.rs index d371023f218..83c116e9b05 100644 --- a/src/libstd/sys/windows/thread_local.rs +++ b/src/libstd/sys/windows/thread_local.rs @@ -137,7 +137,7 @@ unsafe fn init_dtors() { rt::at_exit(move|| { DTOR_LOCK.lock(); let dtors = DTORS; - DTORS = 0 as *mut _; + DTORS = ptr::null_mut(); mem::transmute::<_, Box<Vec<(Key, Dtor)>>>(dtors); assert!(DTORS.is_null()); // can't re-init after destructing DTOR_LOCK.unlock(); @@ -250,7 +250,7 @@ unsafe fn run_dtors() { for &(key, dtor) in dtors.iter() { let ptr = TlsGetValue(key); if !ptr.is_null() { - TlsSetValue(key, 0 as *mut _); + TlsSetValue(key, ptr::null_mut()); dtor(ptr as *mut _); any_run = true; } |
