aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_dom_boot.c
diff options
context:
space:
mode:
authorMichael Young <m.a.young@durham.ac.uk>2013-02-13 17:00:15 +0000
committerMichael Young <m.a.young@durham.ac.uk>2013-02-13 17:00:15 +0000
commitd119301b5816b39b5ba722a2f8b301b37e8e34bd (patch)
treeb61060cef8f2d520e2303df56cdc1f415c1ab88b /tools/libxc/xc_dom_boot.c
parentb61ed421d2c85b5b106c63f2c14f8aa162b282f0 (diff)
downloadxen-d119301b5816b39b5ba722a2f8b301b37e8e34bd.tar.gz
xen-d119301b5816b39b5ba722a2f8b301b37e8e34bd.tar.bz2
xen-d119301b5816b39b5ba722a2f8b301b37e8e34bd.zip
tools: Fix memset(&p,0,sizeof(p)) idiom in several places.
gcc 4.8 identifies several places where code of the form memset(x, 0, sizeof(x)); is used incorrectly, meaning that less memory is set to zero than required. Signed-off-by: Michael Young <m.a.young@durham.ac.uk> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/libxc/xc_dom_boot.c')
-rw-r--r--tools/libxc/xc_dom_boot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxc/xc_dom_boot.c b/tools/libxc/xc_dom_boot.c
index f83aa12d91..0cf36d83eb 100644
--- a/tools/libxc/xc_dom_boot.c
+++ b/tools/libxc/xc_dom_boot.c
@@ -266,7 +266,7 @@ int xc_dom_boot_image(struct xc_dom_image *dom)
return rc;
/* let the vm run */
- memset(ctxt, 0, sizeof(ctxt));
+ memset(ctxt, 0, sizeof(*ctxt));
if ( (rc = dom->arch_hooks->vcpu(dom, ctxt)) != 0 )
return rc;
xc_dom_unmap_all(dom);