bolts: openbsd (snapshot) clippy fix (#1502)
This commit is contained in:
parent
04aecd97f6
commit
b090bc7b4b
@ -828,6 +828,7 @@ fn get_core_ids_helper() -> Result<Vec<CoreId>, Error> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "openbsd")]
|
#[cfg(target_os = "openbsd")]
|
||||||
|
#[allow(clippy::unnecessary_wraps)]
|
||||||
#[inline]
|
#[inline]
|
||||||
fn set_for_current_helper(_: CoreId) -> Result<(), Error> {
|
fn set_for_current_helper(_: CoreId) -> Result<(), Error> {
|
||||||
Ok(()) // There is no notion of cpu affinity on this platform
|
Ok(()) // There is no notion of cpu affinity on this platform
|
||||||
|
@ -726,23 +726,23 @@ fn write_minibsod<W: Write>(writer: &mut BufWriter<W>) -> Result<(), std::io::Er
|
|||||||
{
|
{
|
||||||
let end: u64 = s as u64;
|
let end: u64 = s as u64;
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut entry = pentry.assume_init();
|
let mut e = pentry.assume_init();
|
||||||
while libc::sysctl(
|
while libc::sysctl(
|
||||||
mib,
|
mib,
|
||||||
miblen,
|
miblen,
|
||||||
&mut entry as *mut libc::kinfo_vmentry as *mut libc::c_void,
|
&mut e as *mut libc::kinfo_vmentry as *mut libc::c_void,
|
||||||
&mut s,
|
&mut s,
|
||||||
std::ptr::null_mut(),
|
std::ptr::null_mut(),
|
||||||
0,
|
0,
|
||||||
) == 0
|
) == 0
|
||||||
{
|
{
|
||||||
if entry.kve_end == end {
|
if e.kve_end == end {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// OpenBSD's vm mappings have no knowledge of their paths on disk
|
// OpenBSD's vm mappings have no knowledge of their paths on disk
|
||||||
let i = format!("{}-{}\n", entry.kve_start, entry.kve_end);
|
let i = format!("{}-{}\n", e.kve_start, e.kve_end);
|
||||||
writer.write_all(&i.into_bytes())?;
|
writer.write_all(&i.into_bytes())?;
|
||||||
entry.kve_start = entry.kve_start + 1;
|
e.kve_start += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user