Skip to content

Commit b090bc7

Browse files
authored
bolts: openbsd (snapshot) clippy fix (#1502)
1 parent 04aecd9 commit b090bc7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

libafl_bolts/src/core_affinity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,7 @@ fn get_core_ids_helper() -> Result<Vec<CoreId>, Error> {
828828
}
829829

830830
#[cfg(target_os = "openbsd")]
831+
#[allow(clippy::unnecessary_wraps)]
831832
#[inline]
832833
fn set_for_current_helper(_: CoreId) -> Result<(), Error> {
833834
Ok(()) // There is no notion of cpu affinity on this platform

libafl_bolts/src/minibsod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -726,23 +726,23 @@ fn write_minibsod<W: Write>(writer: &mut BufWriter<W>) -> Result<(), std::io::Er
726726
{
727727
let end: u64 = s as u64;
728728
unsafe {
729-
let mut entry = pentry.assume_init();
729+
let mut e = pentry.assume_init();
730730
while libc::sysctl(
731731
mib,
732732
miblen,
733-
&mut entry as *mut libc::kinfo_vmentry as *mut libc::c_void,
733+
&mut e as *mut libc::kinfo_vmentry as *mut libc::c_void,
734734
&mut s,
735735
std::ptr::null_mut(),
736736
0,
737737
) == 0
738738
{
739-
if entry.kve_end == end {
739+
if e.kve_end == end {
740740
break;
741741
}
742742
// OpenBSD's vm mappings have no knowledge of their paths on disk
743-
let i = format!("{}-{}\n", entry.kve_start, entry.kve_end);
743+
let i = format!("{}-{}\n", e.kve_start, e.kve_end);
744744
writer.write_all(&i.into_bytes())?;
745-
entry.kve_start = entry.kve_start + 1;
745+
e.kve_start += 1;
746746
}
747747
}
748748
} else {

0 commit comments

Comments
 (0)