mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 09:47:44 +00:00
hv: fix 'No brackets to then/else'
- add missing brackets for 'if/else' statements based on MISRA-C requirements v1 -> v2: * add brackets for each conditions in 'if' statements to improve the readability * modify 'ptdev_init' to make the logic clearer Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
@@ -82,8 +82,9 @@ void relocate(void)
|
||||
|
||||
/* get the delta that needs to be patched */
|
||||
delta = get_hv_image_delta();
|
||||
if (delta == 0U)
|
||||
if (delta == 0U) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Look for the descriptoin of relocation sections */
|
||||
for (dyn = (struct Elf64_Dyn *)_DYNAMIC; dyn->d_tag != DT_NULL; dyn++) {
|
||||
@@ -101,8 +102,9 @@ void relocate(void)
|
||||
}
|
||||
|
||||
/* Sanity check */
|
||||
if ((start == NULL) || (size == 0U))
|
||||
if ((start == NULL) || (size == 0U)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Need to subtract the relocation delta to get the correct
|
||||
|
Reference in New Issue
Block a user