xc_linux_save was broken in 13594:30af6cfdb05c. Unbreak it.
authorkaf24@localhost.localdomain <kaf24@localhost.localdomain>
Tue, 30 Jan 2007 13:39:37 +0000 (13:39 +0000)
committerkaf24@localhost.localdomain <kaf24@localhost.localdomain>
Tue, 30 Jan 2007 13:39:37 +0000 (13:39 +0000)
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
tools/libxc/xc_linux_save.c

index e6c1799d7c14a2af80a65c69f66885dce5ec99ca..de1c605002c33f446c6e775d0364b4b5474bfa64 100644 (file)
@@ -998,7 +998,7 @@ int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
             }
 
             for ( j = 0; j < batch; j++ )
-                ((uint32_t *)pfn_type)[i] = pfn_type[i];
+                ((uint32_t *)pfn_type)[j] = pfn_type[j];
             if ( xc_get_pfn_type_batch(xc_handle, dom, batch,
                                        (uint32_t *)pfn_type) )
             {
@@ -1006,7 +1006,7 @@ int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
                 goto out;
             }
             for ( j = batch-1; j >= 0; j-- )
-                pfn_type[i] = ((uint32_t *)pfn_type)[i];
+                pfn_type[j] = ((uint32_t *)pfn_type)[j];
 
             for ( j = 0; j < batch; j++ )
             {