diff mbox

[07/36] buffered_file: Use right "opaque"

Message ID 59b76df2ff78727551dfa45b02af2ca5e442d84b.1318326683.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela Oct. 11, 2011, 10 a.m. UTC
buffered_close 's' variable is of type QEMUFileBuffered, and
wait_for_unfreeze() expect to receive a MigrationState, that
'coincidentaly' is s->opaque.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 buffered_file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Anthony Liguori Oct. 17, 2011, 1:56 p.m. UTC | #1
On 10/11/2011 05:00 AM, Juan Quintela wrote:
> buffered_close 's' variable is of type QEMUFileBuffered, and
> wait_for_unfreeze() expect to receive a MigrationState, that
> 'coincidentaly' is s->opaque.
>
> Signed-off-by: Juan Quintela<quintela@redhat.com>

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>

Regards,

Anthony Liguori

> ---
>   buffered_file.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/buffered_file.c b/buffered_file.c
> index bcdf04f..701b440 100644
> --- a/buffered_file.c
> +++ b/buffered_file.c
> @@ -176,7 +176,7 @@ static int buffered_close(void *opaque)
>       while (!s->has_error&&  s->buffer_size) {
>           buffered_flush(s);
>           if (s->freeze_output)
> -            s->wait_for_unfreeze(s);
> +            s->wait_for_unfreeze(s->opaque);
>       }
>
>       ret = s->close(s->opaque);
diff mbox

Patch

diff --git a/buffered_file.c b/buffered_file.c
index bcdf04f..701b440 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -176,7 +176,7 @@  static int buffered_close(void *opaque)
     while (!s->has_error && s->buffer_size) {
         buffered_flush(s);
         if (s->freeze_output)
-            s->wait_for_unfreeze(s);
+            s->wait_for_unfreeze(s->opaque);
     }

     ret = s->close(s->opaque);