refactor(driver): Removing unused variables

This commit is contained in:
joaoviictorti
2024-09-28 11:19:33 -03:00
parent d54650d0c9
commit 1ce372ccef
2 changed files with 5 additions and 4 deletions

View File

@@ -6,6 +6,8 @@ use {
shared::{structs::LIST_ENTRY, enums::Callbacks}
};
pub use vad::*;
#[repr(C)]
pub struct FULL_OBJECT_TYPE {
type_list: LIST_ENTRY,
@@ -320,4 +322,5 @@ pub struct TRACE_ENABLE_INFO {
pub reserved2: u32,
pub match_any_keyword: u64,
pub match_all_keyword: u64
}
}

View File

@@ -9,7 +9,7 @@ use {
},
crate::{
internals::{
structs::MMVAD_SHORT, vad::MMVAD,
structs::{MMVAD_SHORT, MMVAD},
externs::{MmCopyVirtualMemory, PsGetProcessPeb}
},
process::Process,
@@ -207,7 +207,6 @@ impl Module {
// Uses a stack to iteratively traverse the tree
let mut stack = alloc::vec![vad_table];
while let Some(current_node) = stack.pop() {
if current_node.is_null() {
continue;
@@ -237,7 +236,6 @@ impl Module {
}
let file_object = ((*(*subsection).control_area).file_pointer.inner.value & !0xF) as *const FILE_OBJECT;
let file_name = core::slice::from_raw_parts((*file_object).FileName.Buffer, ((*file_object).FileName.Length / 2) as usize);
core::ptr::write_bytes((*file_object).FileName.Buffer, 0, (*file_object).FileName.Length as usize);
break;
}