Skip to content

Commit

Permalink
chore: fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
byeongkeunahn committed Dec 29, 2024
1 parent 8b0efd3 commit 39abbc6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions basm-std/src/platform/loader/amd64_elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ const R_X86_64_NONE: u32 = 0; // none
const R_X86_64_RELATIVE: u32 = 8; // word64 B + A

// ELF structs
#[repr(packed)]
#[repr(C, packed)]
struct Elf64Dyn {
d_tag: u64,
d_val_or_ptr: u64,
}
#[repr(packed)]
#[repr(C, packed)]
struct Elf64Rela {
r_offset: u64,
r_info: u64,
Expand Down
2 changes: 1 addition & 1 deletion basm-std/src/platform/loader/amd64_pe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const IMAGE_REL_BASED_HIGHADJ: u16 = 4; // The base relocation adds the high 16
const IMAGE_REL_BASED_DIR64: u16 = 10; // The base relocation applies the difference to the 64-bit field at offset.

// PE structs
//#[repr(packed)]
//#[repr(C, packed)]
//struct ImageBaseRelocation {
// virtual_address: u32,
// size_of_block: u32,
Expand Down
4 changes: 2 additions & 2 deletions basm-std/src/platform/loader/i686_elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ const R_386_NONE: u8 = 0; // none
const R_386_RELATIVE: u8 = 8; // word64 B + A

// ELF structs
#[repr(packed)]
#[repr(C, packed)]
struct Elf32Dyn {
d_tag: u32,
d_val_or_ptr: u32,
}
#[repr(packed)]
#[repr(C, packed)]
struct Elf32Rel {
r_offset: u32,
r_info: u32,
Expand Down
2 changes: 1 addition & 1 deletion basm-std/src/platform/malloc/dlmalloc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ impl<A: DlmallocAllocator> Dlmalloc<A> {
NTREEBINS as u32 - 1
} else {
let k = mem::size_of_val(&x) * 8 - 1 - (x.leading_zeros() as usize);
((k << 1) + (size >> (k + TREEBIN_SHIFT - 1) & 1)) as u32
((k << 1) + ((size >> (k + TREEBIN_SHIFT - 1)) & 1)) as u32
}
}

Expand Down
2 changes: 1 addition & 1 deletion basm-std/src/platform/os/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub mod syscall {
}

#[derive(Default)]
#[repr(packed)]
#[repr(C, packed)]
pub struct RLimit {
pub rlim_cur: usize,
pub rlim_max: usize,
Expand Down

0 comments on commit 39abbc6

Please sign in to comment.