mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xen-mfndump: drop dead assignment to "page" from lookup_pte_func()
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: ae763e4224 ("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>
This commit is contained in:
1 parent
2f69ef9680
commit
cf584d27f5
1 file changed
+2
-2
@@ -265,7 +265,6 @@ int lookup_pte_func(int argc, char *argv[])
|
||||
{
|
||||
struct xc_domain_meminfo minfo;
|
||||
xc_domaininfo_t info;
|
||||
void *page = NULL;
|
||||
unsigned long i, j;
|
||||
int domid, pte_num;
|
||||
xen_pfn_t mfn;
|
||||
@@ -301,6 +300,8 @@ int lookup_pte_func(int argc, char *argv[])
|
||||
|
||||
for ( i = 0; i < minfo.p2m_size; i++ )
|
||||
{
|
||||
void *page;
|
||||
|
||||
if ( !(minfo.pfn_type[i] & XEN_DOMCTL_PFINFO_LTABTYPE_MASK) )
|
||||
continue;
|
||||
|
||||
@@ -323,7 +324,6 @@ int lookup_pte_func(int argc, char *argv[])
|
||||
}
|
||||
|
||||
munmap(page, XC_PAGE_SIZE);
|
||||
page = NULL;
|
||||
}
|
||||
|
||||
xc_unmap_domain_meminfo(xch, &minfo);
|
||||
|
||||