We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f13c6b0 commit 4cd267aCopy full SHA for 4cd267a
src/sys.rs
@@ -19,7 +19,7 @@ use serde::{Deserialize, Serialize};
19
/// negative, and the result of the function as-is otherwise.
20
fn check_err(num: libc::c_long) -> Result<libc::c_long> {
21
if num < 0 {
22
- match Errno::from_i32(num.try_into()?) {
+ match Errno::from_i32(-num.try_into()?) {
23
Errno::UnknownErrno => {
24
bail!("unknown errno: {}", num);
25
}
0 commit comments