Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
return NULL;
}
- memset(mc_ext, 0, sizeof(mc_ext));
+ memset(mc_ext, 0, sizeof(*mc_ext));
mc_ext->common.type = MC_TYPE_EXTENDED;
- mc_ext->common.size = sizeof(mc_ext);
+ mc_ext->common.size = sizeof(*mc_ext);
mc_ext->mc_msrs = 3;
mc_ext->mc_msr[0].reg = MSR_F10_MC4_MISC1;
}
*req_ptr = NULL;
- req = xmalloc(mem_event_request_t);
+ req = xzalloc(mem_event_request_t);
if ( req )
{
*req_ptr = req;
- memset(req, 0, sizeof(req));
req->reason = MEM_EVENT_REASON_VIOLATION;
/* Pause the current VCPU */