[Spice-devel] [PATCH spice 01/11] server/red_worker: fix dump_bitmap
Christophe Fergeau
cfergeau at redhat.com
Tue Apr 10 02:29:50 PDT 2012
ACK, I favour unsigned int for loop indexes which start at 0, but
that's just a nit
Christophe
On Sun, Apr 08, 2012 at 06:43:10PM +0300, Yonit Halperin wrote:
>
> Signed-off-by: Yonit Halperin <yhalperi at redhat.com>
> ---
> server/red_worker.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/server/red_worker.c b/server/red_worker.c
> index 07782c8..5350195 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -11348,10 +11348,11 @@ static void dump_bitmap(RedWorker *worker, SpiceBitmap *bitmap, uint32_t group_i
> }
> /* writing the data */
> for (i = 0; i < bitmap->data->num_chunks; i++) {
> + int j;
> 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.7.7.6
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120410/deccbf1f/attachment.pgp>
More information about the Spice-devel
mailing list