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:
commit
22224ca449
4 changed files with 13 additions and 13 deletions
|
|
@ -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 => {}
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue