removed useless braces..

merge-requests/1/merge
xerox 4 years ago
parent 7ea271bfec
commit a1171f1524

@ -78,32 +78,28 @@ namespace nasa
{ {
const auto pml4 = const auto pml4 =
reinterpret_cast<ppml4e>( reinterpret_cast<ppml4e>(
set_page(dirbase)); set_page(dirbase))[pml4e_index] = pml4e{ NULL };
pml4[pml4e_index] = pml4e{ NULL };
} }
void* mem_ctx::set_page(void* addr) void* mem_ctx::set_page(void* addr)
{ {
// table entry change. // table entry change.
++pte_index;
if (pte_index >= 511)
{ {
++pte_index; ++pde_index;
if (pte_index >= 511) pte_index = 0;
{ }
++pde_index;
pte_index = 0;
}
if (pde_index >= 511)
{
++pdpte_index;
pde_index = 0;
}
if (pdpte_index >= 511) if (pde_index >= 511)
pdpte_index = 0; {
++pdpte_index;
pde_index = 0;
} }
if (pdpte_index >= 511)
pdpte_index = 0;
pdpte new_pdpte = { NULL }; pdpte new_pdpte = { NULL };
new_pdpte.present = true; new_pdpte.present = true;
new_pdpte.rw = true; new_pdpte.rw = true;

Loading…
Cancel
Save