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/liblog | |
| 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/liblog')
| -rw-r--r-- | src/liblog/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index a166dc369cb..433b8aa6941 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -179,6 +179,7 @@ use std::io::LineBufferedWriter; use std::io; use std::mem; use std::os; +use std::ptr; use std::rt; use std::slice; use std::sync::{Once, ONCE_INIT}; @@ -436,11 +437,11 @@ fn init() { assert!(!DIRECTIVES.is_null()); let _directives: Box<Vec<directive::LogDirective>> = mem::transmute(DIRECTIVES); - DIRECTIVES = 0 as *const Vec<directive::LogDirective>; + DIRECTIVES = ptr::null(); if !FILTER.is_null() { let _filter: Box<Regex> = mem::transmute(FILTER); - FILTER = 0 as *const _; + FILTER = ptr::null(); } }); } |
