Skip to content

Commit

Permalink
fix style and simplify sched_getaffinity() return
Browse files Browse the repository at this point in the history
  • Loading branch information
thib-ack committed Nov 1, 2019
1 parent 8f9956b commit 21f9699
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/sched.rs
Expand Up @@ -102,14 +102,11 @@ mod sched_linux_like {
libc::sched_getaffinity(
pid.into(),
mem::size_of::<CpuSet>() as libc::size_t,
& mut cpuset.cpu_set,
&mut cpuset.cpu_set,
)
};

match res {
0 => Ok(cpuset),
_ => Err(Error::from_errno(Errno::from_i32(res))),
}
Errno::result(res).and(Ok(cpuset))
}

pub fn clone(
Expand Down

0 comments on commit 21f9699

Please sign in to comment.