Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openbsd (snapshot) bolts clippy fix #1502

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libafl_bolts/src/core_affinity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ fn get_core_ids_helper() -> Result<Vec<CoreId>, Error> {
}

#[cfg(target_os = "openbsd")]
#[allow(clippy::unnecessary_wraps)]
#[inline]
fn set_for_current_helper(_: CoreId) -> Result<(), Error> {
Ok(()) // There is no notion of cpu affinity on this platform
Expand Down
10 changes: 5 additions & 5 deletions libafl_bolts/src/minibsod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,23 +726,23 @@ fn write_minibsod<W: Write>(writer: &mut BufWriter<W>) -> Result<(), std::io::Er
{
let end: u64 = s as u64;
unsafe {
let mut entry = pentry.assume_init();
let mut e = pentry.assume_init();
while libc::sysctl(
mib,
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,
std::ptr::null_mut(),
0,
) == 0
{
if entry.kve_end == end {
if e.kve_end == end {
break;
}
// 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())?;
entry.kve_start = entry.kve_start + 1;
e.kve_start += 1;
}
}
} else {
Expand Down
Loading