1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:58:12 +00:00

Kernel: Use range-for with InlineLinkedList

This commit is contained in:
Andreas Kling 2019-08-08 13:40:58 +02:00
parent 028e834bb4
commit 9104d32341
6 changed files with 21 additions and 21 deletions

View file

@ -246,9 +246,9 @@ Region* MemoryManager::kernel_region_from_vaddr(VirtualAddress vaddr)
{
if (vaddr.get() < 0xc0000000)
return nullptr;
for (auto* region = MM.m_kernel_regions.head(); region; region = region->next()) {
if (region->contains(vaddr))
return region;
for (auto& region : MM.m_kernel_regions) {
if (region.contains(vaddr))
return &region;
}
return nullptr;
}