Use null()/null_mut() instead of 0 as *const T/0 as *mut T

This commit is contained in:
Vadim Petrochenkov
2015-09-03 09:49:50 +03:00
parent 3903ea96f5
commit 06fb196256
22 changed files with 65 additions and 52 deletions

View File

@@ -93,7 +93,7 @@ mod imp {
// See comment above for why this function returns.
}
static mut MAIN_ALTSTACK: *mut libc::c_void = 0 as *mut libc::c_void;
static mut MAIN_ALTSTACK: *mut libc::c_void = ptr::null_mut();
pub unsafe fn init() {
PAGE_SIZE = ::sys::os::page_size();
@@ -155,7 +155,7 @@ mod imp {
}
pub unsafe fn make_handler() -> super::Handler {
super::Handler { _data: 0 as *mut libc::c_void }
super::Handler { _data: ptr::null_mut() }
}
pub unsafe fn drop_handler(_handler: &mut super::Handler) {