summaryrefslogtreecommitdiff
path: root/kernel/arch/i386
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-06-09 22:05:53 +0200
committerAnton Kling <anton@kling.gg>2024-06-09 22:05:53 +0200
commit15003d1b0abccc8bcef84386c4a6da176e41f883 (patch)
treed4f8c4f1602ee9e6c4332f3b0585d0e284d0f695 /kernel/arch/i386
parentddd796325c9c703f007f046ed9f6fd9eb0ba6383 (diff)
Add UDP
Diffstat (limited to 'kernel/arch/i386')
-rw-r--r--kernel/arch/i386/mmu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/arch/i386/mmu.c b/kernel/arch/i386/mmu.c
index cfcb63b..28f6fd2 100644
--- a/kernel/arch/i386/mmu.c
+++ b/kernel/arch/i386/mmu.c
@@ -157,9 +157,9 @@ int get_free_frame(u32 *frame) {
int write_to_frame(u32 frame_address, u8 on) {
u32 frame = frame_address / 0x1000;
- if (INDEX_FROM_BIT(frame) >= num_array_frames) {
- return 0;
- }
+ if (INDEX_FROM_BIT(frame) >= num_array_frames) {
+ return 0;
+ }
if (on) {
int frame_is_used = (0 != (tmp_small_frames[INDEX_FROM_BIT(frame)] &
((u32)0x1 << OFFSET_FROM_BIT(frame))));
@@ -545,7 +545,7 @@ void *physical_to_virtual(void *address) {
}
void *virtual_to_physical(void *address, PageDirectory *directory) {
- if (0 == directory) {
+ if (!directory) {
directory = get_active_pagedirectory();
}
Page *p = get_page((void *)address, directory, PAGE_NO_ALLOCATE, 0);