mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/libxc: Drop copy-in in xc_physinfo()
The first thing XEN_SYSCTL_physinfo does is zero op->u.physinfo. Do not copy-in. It's pointless, and most callers don't initialise their xc_physinfo_t buffer to begin with. Remove the redundant zeroing from the remaining callers. Spotted by Coverity. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Wei Chen <Wei.Chen@arm.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
1 parent
af0c5430a8
commit
06cc1f886f
6 files changed
+5
-7
No files matched your search
@@ -436,7 +436,7 @@ static struct t_struct *map_tbufs(unsigned long tbufs_mfn, unsigned int num,
|
||||
*/
|
||||
static unsigned int get_num_cpus(void)
|
||||
{
|
||||
xc_physinfo_t physinfo = { 0 };
|
||||
xc_physinfo_t physinfo;
|
||||
xc_interface *xc_handle = xc_interface_open(0,0,0);
|
||||
int ret;
|
||||
|
||||
|
||||