From: Wei Liu Date: Thu, 28 Sep 2017 10:00:00 +0000 (+0100) Subject: libxendevicemodel: initialise extent.pad to zero X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1314 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=71b7b4e0f5f9d0f7e4fe10871393febefb93c8c4;p=xen.git libxendevicemodel: initialise extent.pad to zero The pad field needs to be zero as required by the hypervisor. Instead of setting the pad separately, use C99 initialiser. Signed-off-by: Wei Liu Reviewed-by: Paul Durrant --- diff --git a/tools/libs/devicemodel/core.c b/tools/libs/devicemodel/core.c index fcb260d29b..0f2c1a791f 100644 --- a/tools/libs/devicemodel/core.c +++ b/tools/libs/devicemodel/core.c @@ -483,10 +483,10 @@ int xendevicemodel_modified_memory( xendevicemodel_handle *dmod, domid_t domid, uint64_t first_pfn, uint32_t nr) { - struct xen_dm_op_modified_memory_extent extent; - - extent.first_pfn = first_pfn; - extent.nr = nr; + struct xen_dm_op_modified_memory_extent extent = { + .first_pfn = first_pfn, + .nr = nr, + }; return xendevicemodel_modified_memory_bulk(dmod, domid, &extent, 1); }