mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
fix MISRA C"Literal zero used in pointer context"
MISRC C required pointer to zero should be replace with NULL Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
This commit is contained in:
@@ -216,7 +216,7 @@ int register_mmio_emulation_handler(struct vm *vm,
|
||||
}
|
||||
|
||||
/* Ensure both a read/write handler and range check function exist */
|
||||
if ((read_write != HV_NULL) && (end > start)) {
|
||||
if ((read_write != NULL) && (end > start)) {
|
||||
/* Allocate memory for node */
|
||||
mmio_node =
|
||||
(struct mem_io_node *)calloc(1, sizeof(struct mem_io_node));
|
||||
|
@@ -130,7 +130,7 @@ static const struct vm_exit_dispatch dispatch_table[] = {
|
||||
|
||||
int vmexit_handler(struct vcpu *vcpu)
|
||||
{
|
||||
struct vm_exit_dispatch *dispatch = HV_NULL;
|
||||
struct vm_exit_dispatch *dispatch = NULL;
|
||||
uint16_t basic_exit_reason;
|
||||
int ret;
|
||||
|
||||
|
@@ -100,7 +100,7 @@ int exec_vmxon_instr(uint32_t pcpu_id)
|
||||
else
|
||||
vmxon_region_va = HPA2HVA(per_cpu(vmxon_region_pa, pcpu_id));
|
||||
|
||||
if (vmxon_region_va != 0) {
|
||||
if (vmxon_region_va != NULL) {
|
||||
/* Initialize vmxon page with revision id from IA32 VMX BASIC
|
||||
* MSR
|
||||
*/
|
||||
|
Reference in New Issue
Block a user