The variable isn't used past the loop, and its value also isn't
meaningful across iterations. Reduce its scope to make this more
obvious.
Coverity ID:
1532310
Fixes: ae763e422430 ("tools/misc: introduce xen-mfndump")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Jason Andryuk <jandryuk@gmail.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
{
struct xc_domain_meminfo minfo;
xc_domaininfo_t info;
- void *page = NULL;
unsigned long i, j;
int domid, pte_num;
xen_pfn_t mfn;
for ( i = 0; i < minfo.p2m_size; i++ )
{
+ void *page;
+
if ( !(minfo.pfn_type[i] & XEN_DOMCTL_PFINFO_LTABTYPE_MASK) )
continue;
}
munmap(page, XC_PAGE_SIZE);
- page = NULL;
}
xc_unmap_domain_meminfo(xch, &minfo);