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:
Huihuang Shi
2018-06-08 13:12:06 +08:00
committed by lijinxia
parent 7710940195
commit 8940c896be
7 changed files with 8 additions and 11 deletions

View File

@@ -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));

View File

@@ -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;

View File

@@ -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
*/