Skip to content

Commit

Permalink
Kernel: Fix some clang-tidy whines in CoreDump
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Feb 25, 2021
1 parent 53c6c29 commit 3c9cebe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Kernel/CoreDump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ CoreDump::~CoreDump()
RefPtr<FileDescription> CoreDump::create_target_file(const Process& process, const String& output_path)
{
LexicalPath lexical_path(output_path);
auto output_directory = lexical_path.dirname();
const auto& output_directory = lexical_path.dirname();
auto dump_directory = VFS::the().open_directory(output_directory, VFS::the().root_custody());
if (dump_directory.is_error()) {
dbgln("Can't find directory '{}' for core dump", output_directory);
Expand Down Expand Up @@ -141,7 +141,7 @@ KResult CoreDump::write_program_headers(size_t notes_size)

phdr.p_type = PT_LOAD;
phdr.p_offset = offset;
phdr.p_vaddr = reinterpret_cast<uint32_t>(region.vaddr().as_ptr());
phdr.p_vaddr = region.vaddr().get();
phdr.p_paddr = 0;

phdr.p_filesz = region.page_count() * PAGE_SIZE;
Expand Down Expand Up @@ -264,8 +264,8 @@ ByteBuffer CoreDump::create_notes_regions_data() const
info.header.type = ELF::Core::NotesEntryHeader::Type::MemoryRegionInfo;

auto& region = m_process->space().regions()[region_index];
info.region_start = reinterpret_cast<uint32_t>(region.vaddr().as_ptr());
info.region_end = reinterpret_cast<uint32_t>(region.vaddr().as_ptr() + region.size());
info.region_start = region.vaddr().get();
info.region_end = region.vaddr().offset(region.size()).get();
info.program_header_index = region_index;

memory_region_info_buffer.append((void*)&info, sizeof(info));
Expand Down

0 comments on commit 3c9cebe

Please sign in to comment.