diff options
author | Andrew Kaster <akaster@serenityos.org> | 2021-10-31 16:36:52 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-14 22:52:35 +0100 |
commit | e824bead5477e7dc16343d4812d4c37dfbda9efd (patch) | |
tree | 5533e70fc71aa956419118c1701722c0adc63d04 /Kernel/Process.cpp | |
parent | 65edc62c0250cc544bb098e112de3991144079d4 (diff) | |
download | serenity-e824bead5477e7dc16343d4812d4c37dfbda9efd.zip |
Kernel: Resolve clang-tidy readability-qualified-auto warning
... In files included by Kernel/Process.cpp or Kernel/Thread.cpp
Diffstat (limited to 'Kernel/Process.cpp')
-rw-r--r-- | Kernel/Process.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp index cec01c5278..e30414aa81 100644 --- a/Kernel/Process.cpp +++ b/Kernel/Process.cpp @@ -102,7 +102,7 @@ void Process::kill_threads_except_self() if (thread_count() <= 1) return; - auto current_thread = Thread::current(); + auto* current_thread = Thread::current(); for_each_thread([&](Thread& thread) { if (&thread == current_thread) return; @@ -378,7 +378,7 @@ void Process::crash(int signal, FlatPtr ip, bool out_of_memory) dbgln("\033[31;1mOut of memory\033[m, killing: {}", *this); } else { if (ip >= kernel_load_base && g_kernel_symbols_available) { - auto* symbol = symbolicate_kernel_address(ip); + auto const* symbol = symbolicate_kernel_address(ip); dbgln("\033[31;1m{:p} {} +{}\033[0m\n", ip, (symbol ? symbol->name : "(k?)"), (symbol ? ip - symbol->address : 0)); } else { dbgln("\033[31;1m{:p} (?)\033[0m\n", ip); @@ -402,7 +402,7 @@ void Process::crash(int signal, FlatPtr ip, bool out_of_memory) RefPtr<Process> Process::from_pid(ProcessID pid) { return processes().with([&](const auto& list) -> RefPtr<Process> { - for (auto& process : list) { + for (auto const& process : list) { if (process.pid() == pid) return &process; } @@ -416,7 +416,7 @@ const Process::OpenFileDescriptionAndFlags* Process::OpenFileDescriptions::get_i if (m_fds_metadatas.size() <= i) return nullptr; - if (auto& metadata = m_fds_metadatas[i]; metadata.is_valid()) + if (auto const& metadata = m_fds_metadatas[i]; metadata.is_valid()) return &metadata; return nullptr; @@ -462,7 +462,7 @@ ErrorOr<NonnullRefPtr<OpenFileDescription>> Process::OpenFileDescriptions::open_ void Process::OpenFileDescriptions::enumerate(Function<void(const OpenFileDescriptionAndFlags&)> callback) const { SpinlockLocker lock(m_fds_lock); - for (auto& file_description_metadata : m_fds_metadatas) { + for (auto const& file_description_metadata : m_fds_metadatas) { callback(file_description_metadata); } } |