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.
This commit is contained in:
bors 2015-02-17 03:42:54 +00:00
commit 22224ca449
4 changed files with 13 additions and 13 deletions

View file

@ -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 => {}

View file

@ -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())
}