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/unix/pipe.rs | |
| 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/unix/pipe.rs')
| -rw-r--r-- | src/libstd/sys/unix/pipe.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/pipe.rs b/src/libstd/sys/unix/pipe.rs index 2dde9c0e615..01059413338 100644 --- a/src/libstd/sys/unix/pipe.rs +++ b/src/libstd/sys/unix/pipe.rs @@ -14,6 +14,7 @@ use cmp; use io; use libc::{self, c_int}; use mem; +use ptr; use sys::cvt_r; use sys::fd::FileDesc; @@ -92,8 +93,8 @@ pub fn read2(p1: AnonPipe, let mut read: libc::fd_set = mem::zeroed(); libc::FD_SET(p1.raw(), &mut read); libc::FD_SET(p2.raw(), &mut read); - libc::select(max + 1, &mut read, 0 as *mut _, 0 as *mut _, - 0 as *mut _) + libc::select(max + 1, &mut read, ptr::null_mut(), ptr::null_mut(), + ptr::null_mut()) })?; // Read as much as we can from each pipe, ignoring EWOULDBLOCK or |
