>>> On 30.03.16 at 13:26, <paul.durr...@citrix.com> wrote:
>> From: Jan Beulich [mailto:jbeul...@suse.com]
>> Sent: 30 March 2016 12:23
>> >>> On 30.03.16 at 12:32, <paul.durr...@citrix.com> wrote:
>> > --- a/xen/arch/x86/hvm/viridian.c
>> > +++ b/xen/arch/x86/hvm/viridian.c
>> > @@ -824,6 +824,8 @@ static int viridian_save_vcpu_ctxt(struct domain *d,
>> hvm_domain_context_t *h)
>> >      for_each_vcpu( d, v ) {
>> >          struct hvm_viridian_vcpu_context ctxt;
>> >
>> > +        memset(&ctxt, 0, sizeof(ctxt));
>> 
>> How about just adding an empty initializer to the declaration?
>> 
> 
> I think having a 'zero the entire struct' call at the start is better as it 
> will cover any additions made to the struct in future. It's what I had 
> mistakenly assumed was already there. In fact I think adding a similar call 
> into the domain context save function would probably be worthwhile.

And how does the initializer approach not fulfill that intention?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to