]> xenbits.xensource.com Git - xen.git/commitdiff
libxc: Pre-zero argument structures for map/unmap_pirq operations.
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 25 Feb 2010 11:52:23 +0000 (11:52 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 25 Feb 2010 11:52:23 +0000 (11:52 +0000)
From: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
tools/libxc/xc_physdev.c

index 00ac829afa8e25f225890f26ba1ff9dd41cadff6..dd484a1bae7f1b105fb41f7d450820dbc0bf9b22 100644 (file)
@@ -31,6 +31,7 @@ int xc_physdev_map_pirq(int xc_handle,
     if ( !pirq )
         return -EINVAL;
 
+    memset(&map, 0, sizeof(struct physdev_map_pirq));
     map.domid = domid;
     map.type = MAP_PIRQ_TYPE_GSI;
     map.index = index;
@@ -59,6 +60,7 @@ int xc_physdev_map_pirq_msi(int xc_handle,
     if ( !pirq )
         return -EINVAL;
 
+    memset(&map, 0, sizeof(struct physdev_map_pirq));
     map.domid = domid;
     map.type = MAP_PIRQ_TYPE_MSI;
     map.index = index;
@@ -83,6 +85,7 @@ int xc_physdev_unmap_pirq(int xc_handle,
     int rc;
     struct physdev_unmap_pirq unmap;
 
+    memset(&unmap, 0, sizeof(struct physdev_unmap_pirq));
     unmap.domid = domid;
     unmap.pirq = pirq;