mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
hv: fix MISRA-C issues related to for loop
This patch fixes the following issues: - Assignment operation in expression. - For loop incrementation is not simple. - No brackets to loop body. - Use of comma operator. v1 -> v2: * Replace &x->y with &(x->y) based on our new coding rule Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -184,8 +184,9 @@ static void update_trampoline_code_refs(uint64_t dest_pa)
|
||||
*(uint64_t *)(ptr) += dest_pa;
|
||||
|
||||
ptr = HPA2HVA(dest_pa + trampoline_relo_addr(&trampoline_pdpt_addr));
|
||||
for (i = 0; i < 4; i++)
|
||||
for (i = 0; i < 4; i++) {
|
||||
*(uint64_t *)(ptr + sizeof(uint64_t) * i) += dest_pa;
|
||||
}
|
||||
|
||||
/* update the gdt base pointer with relocated offset */
|
||||
ptr = HPA2HVA(dest_pa + trampoline_relo_addr(&trampoline_gdt_ptr));
|
||||
|
Reference in New Issue
Block a user