Patchwork [27/41] migration: remove useless qemu_file_get_error check

login
register
mail settings
Submitter Paolo Bonzini
Date Feb. 15, 2013, 5:46 p.m.
Message ID <1360950433-17106-28-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/220805/
State New
Headers show

Comments

Paolo Bonzini - Feb. 15, 2013, 5:46 p.m.
migration_put_buffer is never called if there has been an error.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 migration.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
Orit Wasserman - Feb. 21, 2013, 7:33 a.m.
On 02/15/2013 07:46 PM, Paolo Bonzini wrote:
> migration_put_buffer is never called if there has been an error.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  migration.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/migration.c b/migration.c
> index 63ecab5..3de7cbf 100644
> --- a/migration.c
> +++ b/migration.c
> @@ -512,12 +512,6 @@ static int migration_put_buffer(void *opaque, const uint8_t *buf,
>  
>      DPRINTF("putting %d bytes at %" PRId64 "\n", size, pos);
>  
> -    ret = qemu_file_get_error(s->file);
> -    if (ret) {
> -        DPRINTF("flush when error, bailing: %s\n", strerror(-error));
> -        return ret;
> -    }
> -
>      if (size <= 0) {
>          return size;
>      }
> 
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Juan Quintela - Feb. 22, 2013, 11:15 a.m.
Paolo Bonzini <pbonzini@redhat.com> wrote:
> migration_put_buffer is never called if there has been an error.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

Patch

diff --git a/migration.c b/migration.c
index 63ecab5..3de7cbf 100644
--- a/migration.c
+++ b/migration.c
@@ -512,12 +512,6 @@  static int migration_put_buffer(void *opaque, const uint8_t *buf,
 
     DPRINTF("putting %d bytes at %" PRId64 "\n", size, pos);
 
-    ret = qemu_file_get_error(s->file);
-    if (ret) {
-        DPRINTF("flush when error, bailing: %s\n", strerror(-error));
-        return ret;
-    }
-
     if (size <= 0) {
         return size;
     }