debuggers.hg

changeset 21025:12a5ca59b175

libxc: Pre-zero argument structures for map/unmap_pirq operations.

From: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Feb 25 11:52:23 2010 +0000 (2010-02-25)
parents 3d8e819241b0
children d9db3684f292
files tools/libxc/xc_physdev.c
line diff
     1.1 --- a/tools/libxc/xc_physdev.c	Wed Feb 24 20:27:56 2010 +0000
     1.2 +++ b/tools/libxc/xc_physdev.c	Thu Feb 25 11:52:23 2010 +0000
     1.3 @@ -31,6 +31,7 @@ int xc_physdev_map_pirq(int xc_handle,
     1.4      if ( !pirq )
     1.5          return -EINVAL;
     1.6  
     1.7 +    memset(&map, 0, sizeof(struct physdev_map_pirq));
     1.8      map.domid = domid;
     1.9      map.type = MAP_PIRQ_TYPE_GSI;
    1.10      map.index = index;
    1.11 @@ -59,6 +60,7 @@ int xc_physdev_map_pirq_msi(int xc_handl
    1.12      if ( !pirq )
    1.13          return -EINVAL;
    1.14  
    1.15 +    memset(&map, 0, sizeof(struct physdev_map_pirq));
    1.16      map.domid = domid;
    1.17      map.type = MAP_PIRQ_TYPE_MSI;
    1.18      map.index = index;
    1.19 @@ -83,6 +85,7 @@ int xc_physdev_unmap_pirq(int xc_handle,
    1.20      int rc;
    1.21      struct physdev_unmap_pirq unmap;
    1.22  
    1.23 +    memset(&unmap, 0, sizeof(struct physdev_unmap_pirq));
    1.24      unmap.domid = domid;
    1.25      unmap.pirq = pirq;
    1.26