diff options
| author | bors <bors@rust-lang.org> | 2015-02-17 03:42:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-17 03:42:54 +0000 |
| commit | 22224ca4499247e99e18fba8a18a4259f0e4d08b (patch) | |
| tree | a2a083c91ddb8586682039fc48d384c6fa963b38 /src/libstd/sys | |
| parent | 81bce5290ff55b9a2eddd83d31b0778180904d7f (diff) | |
| parent | 64d33b1e986116f7bec03b8f2c91fa925b957fa3 (diff) | |
| download | rust-22224ca4499247e99e18fba8a18a4259f0e4d08b.tar.gz rust-22224ca4499247e99e18fba8a18a4259f0e4d08b.zip | |
Auto merge of #21932 - Jormundir:std-os-errno-type, r=alexcrichton
Changes std::os::errno to return i32, the return type used by the function being delegated to. This is my first contribution, so feel free to give me advice. I'll be happy to correct things.
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/process.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/timer.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs index ab06109076e..32e45009887 100644 --- a/src/libstd/sys/unix/process.rs +++ b/src/libstd/sys/unix/process.rs @@ -394,7 +394,7 @@ impl Process { match unsafe { c::select(max, &mut set, ptr::null_mut(), ptr::null_mut(), p) } { // interrupted, retry - -1 if os::errno() == libc::EINTR as uint => continue, + -1 if os::errno() == libc::EINTR as i32 => continue, // We read something, break out and process 1 | 2 => {} diff --git a/src/libstd/sys/unix/timer.rs b/src/libstd/sys/unix/timer.rs index 6a4e47f58ce..4cd98f4442b 100644 --- a/src/libstd/sys/unix/timer.rs +++ b/src/libstd/sys/unix/timer.rs @@ -198,7 +198,7 @@ fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) { assert_eq!(fd.read(&mut buf).ok().unwrap(), 1); } - -1 if os::errno() == libc::EINTR as uint => {} + -1 if os::errno() == libc::EINTR as i32 => {} n => panic!("helper thread failed in select() with error: {} ({})", n, os::last_os_error()) } |
