From 0a347c90d5fd5c8568314f19d5776f8f982adb3c Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 11 Dec 2018 13:38:13 -0500 Subject: [PATCH] kernel: Minor style cleanup to arch_altcodepatch. No functional change intended. --- src/system/kernel/arch/x86/arch_altcodepatch.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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); } - -