[Spice-devel] [PATCH 1/2] spice_bitmap_utils: fix dump_bitmap

Yonit Halperin yhalperi at redhat.com
Thu Aug 22 13:12:53 PDT 2013


---
 server/spice_bitmap_utils.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/spice_bitmap_utils.c b/server/spice_bitmap_utils.c
index ce0a5ed..7b370a0 100644
--- a/server/spice_bitmap_utils.c
+++ b/server/spice_bitmap_utils.c
@@ -63,7 +63,7 @@ void dump_bitmap(SpiceBitmap *bitmap)
     int32_t tmp_32;
     uint16_t tmp_u16;
     FILE *f;
-    int i;
+    int i, j;
 
     switch (bitmap->format) {
     case SPICE_BITMAP_FMT_1BIT_BE:
@@ -159,8 +159,8 @@ void dump_bitmap(SpiceBitmap *bitmap)
     for (i = 0; i < bitmap->data->num_chunks; i++) {
         SpiceChunk *chunk = &bitmap->data->chunk[i];
         int num_lines = chunk->len / bitmap->stride;
-        for (i = 0; i < num_lines; i++) {
-            dump_line(f, chunk->data + (i * bitmap->stride), n_pixel_bits, bitmap->x, row_size);
+        for (j = 0; j < num_lines; j++) {
+            dump_line(f, chunk->data + (j * bitmap->stride), n_pixel_bits, bitmap->x, row_size);
         }
     }
     fclose(f);
-- 
1.8.1.4



More information about the Spice-devel mailing list