diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-09-03 09:49:50 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2015-09-03 09:49:50 +0300 |
| commit | 06fb196256bbab1e7aa4f43daf45321efaa6e0eb (patch) | |
| tree | 23863826af019b2bc07d295882e092d244c36699 /src/liblog | |
| parent | 3903ea96f557dc923cf73d3905554083cd921a01 (diff) | |
| download | rust-06fb196256bbab1e7aa4f43daf45321efaa6e0eb.tar.gz rust-06fb196256bbab1e7aa4f43daf45321efaa6e0eb.zip | |
Use `null()`/`null_mut()` instead of `0 as *const T`/`0 as *mut T`
Diffstat (limited to 'src/liblog')
| -rw-r--r-- | src/liblog/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index 2187c1fb7df..4517c2f9157 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -184,6 +184,7 @@ use std::io::{self, Stderr}; use std::io::prelude::*; use std::mem; use std::env; +use std::ptr; use std::rt; use std::slice; use std::sync::{Once, StaticMutex}; @@ -209,11 +210,10 @@ static LOCK: StaticMutex = StaticMutex::new(); /// logging statement should be run. static mut LOG_LEVEL: u32 = MAX_LOG_LEVEL; -static mut DIRECTIVES: *mut Vec<directive::LogDirective> = - 0 as *mut Vec<directive::LogDirective>; +static mut DIRECTIVES: *mut Vec<directive::LogDirective> = ptr::null_mut(); /// Optional filter. -static mut FILTER: *mut String = 0 as *mut _; +static mut FILTER: *mut String = ptr::null_mut(); /// Debug log level pub const DEBUG: u32 = 4; |
