diff --git a/src/system/kernel/arch/x86/arch_altcodepatch.cpp b/src/system/kernel/arch/x86/arch_altcodepatch.cpp index c38ad739de..d3a19d979d 100644 --- a/src/system/kernel/arch/x86/arch_altcodepatch.cpp +++ b/src/system/kernel/arch/x86/arch_altcodepatch.cpp @@ -35,11 +35,11 @@ arch_altcodepatch_replace(uint16 tag, void* newcodepatch, size_t length) // we need to write to the text area struct elf_image_info* info = elf_get_kernel_image(); - uint32 kernelProtection = B_KERNEL_READ_AREA | B_KERNEL_EXECUTE_AREA; + const uint32 kernelProtection = B_KERNEL_READ_AREA | B_KERNEL_EXECUTE_AREA; set_area_protection(info->text_region.id, kernelProtection | B_KERNEL_WRITE_AREA); - for (altcodepatch *patch = &altcodepatch_begin; patch < &altcodepatch_end; - patch++) { + for (altcodepatch* patch = &altcodepatch_begin; patch < &altcodepatch_end; + patch++) { if (patch->tag != tag) continue; void* address = (void*)(KERNEL_LOAD_BASE + patch->kernel_offset); @@ -55,5 +55,3 @@ arch_altcodepatch_replace(uint16 tag, void* newcodepatch, size_t length) dprintf("arch_altcodepatch_replace found %d altcodepatches\n", count); } - -