HV:fix rest integer violations

Fix integer related violations.
V1->V2:
  clean all memset/calloc integer violations excpet bsp/boot directory

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Huihuang Shi
2018-08-01 12:08:04 +08:00
committed by lijinxia
parent 56904bc235
commit 1664e0c842
11 changed files with 24 additions and 24 deletions

View File

@@ -38,7 +38,7 @@ int32_t hcall_sos_offline_cpu(struct vm *vm, uint64_t lapicid)
foreach_vcpu(i, vm, vcpu) {
if (vlapic_get_apicid(vcpu->arch_vcpu.vlapic) == lapicid) {
/* should not offline BSP */
if (vcpu->vcpu_id == 0)
if (vcpu->vcpu_id == 0U)
return -1;
pause_vcpu(vcpu, VCPU_ZOMBIE);
reset_vcpu(vcpu);

View File

@@ -68,7 +68,7 @@ alloc_entry(struct vm *vm, enum ptdev_intr_type type)
struct ptdev_remapping_info *entry;
/* allocate */
entry = calloc(1, sizeof(*entry));
entry = calloc(1U, sizeof(*entry));
ASSERT(entry != NULL, "alloc memory failed");
entry->type = type;
entry->vm = vm;