]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
grant_table: avoid to shadow "frame" in __gnttab_map_grant_ref
authorJulien Grall <julien.grall@citrix.com>
Thu, 29 Oct 2015 11:20:38 +0000 (12:20 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 29 Oct 2015 11:20:38 +0000 (12:20 +0100)
The variable "frame" is declared twice within the function
__gntab_map_grant_ref.  This makes the code quite confusing to read.

The second definition is not useful as the first one is never used
until then. So drop it.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/grant_table.c

index c92abdaaaed54f1f6c25eae687eaddb5267b19c9..5d52d1e4bbb8c8ff4a991d18efb739e7c8f0f56f 100644 (file)
@@ -826,7 +826,6 @@ __gnttab_map_grant_ref(
 
         if ( !act->pin )
         {
-            unsigned long frame;
             unsigned long gfn = rgt->gt_version == 1 ?
                                 shared_entry_v1(rgt, op->ref).frame :
                                 shared_entry_v2(rgt, op->ref).full_page.frame;