diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2016-06-24 20:54:52 +0200 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2016-07-12 10:40:40 +0200 |
| commit | 81e95c18b7d4c45c7ef41b231af4ecd40543567d (patch) | |
| tree | ced85ac151c5d6c0a892fc063906a232b3b49ea3 /src/libstd/sys/windows | |
| parent | 2539c15b49530e882a3e8803b3f53a7914d367be (diff) | |
| download | rust-81e95c18b7d4c45c7ef41b231af4ecd40543567d.tar.gz rust-81e95c18b7d4c45c7ef41b231af4ecd40543567d.zip | |
Use `ptr::{null, null_mut}` instead of `0 as *{const, mut}`
Diffstat (limited to 'src/libstd/sys/windows')
| -rw-r--r-- | src/libstd/sys/windows/handle.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/windows/pipe.rs | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/libstd/sys/windows/handle.rs b/src/libstd/sys/windows/handle.rs index 74546bb893b..d10abae2865 100644 --- a/src/libstd/sys/windows/handle.rs +++ b/src/libstd/sys/windows/handle.rs @@ -46,10 +46,10 @@ impl Handle { pub fn new_event(manual: bool, init: bool) -> io::Result<Handle> { unsafe { - let event = c::CreateEventW(0 as *mut _, + let event = c::CreateEventW(ptr::null_mut(), manual as c::BOOL, init as c::BOOL, - 0 as *const _); + ptr::null()); if event.is_null() { Err(io::Error::last_os_error()) } else { diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs index 8631a63d653..6e9c67051a6 100644 --- a/src/libstd/sys/windows/pipe.rs +++ b/src/libstd/sys/windows/pipe.rs @@ -12,9 +12,10 @@ use prelude::v1::*; use os::windows::prelude::*; use ffi::OsStr; -use path::Path; use io; use mem; +use path::Path; +use ptr; use rand::{self, Rng}; use slice; use sys::c; @@ -66,7 +67,7 @@ pub fn anon_pipe() -> io::Result<(AnonPipe, AnonPipe)> { 4096, 4096, 0, - 0 as *mut _); + ptr::null_mut()); // We pass the FILE_FLAG_FIRST_PIPE_INSTANCE flag above, and we're // also just doing a best effort at selecting a unique name. If |
