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:
Jan Beulich committed 2023-06-14 12:31:02 +02:00
1 parent 2f69ef9680
commit cf584d27f5
1 file changed
+2 -2
+2 -2
View File
@@ -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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.